Pi Hole - Docker container - DHCP

Currently reading
Pi Hole - Docker container - DHCP

731
247
NAS
DS1815+, DS1819+, DS1522+
Operating system
  1. Windows
Mobile operating system
  1. iOS
I'm running (2) Pi Hole docker containers. Supposedly you can run DHCP server via Pi Hole but I have never been able to get it to work. This would be handy for being able to track individual IP addresses, with DHCP running on my router this doesn't work right. Any ideas?
 
I'm running (2) Pi Hole docker containers. Supposedly you can run DHCP server via Pi Hole but I have never been able to get it to work. This would be handy for being able to track individual IP addresses, with DHCP running on my router this doesn't work right. Any ideas?
I would suggest MacVLAN networking in Docker for those running Pi Hole in docker and wanting to use DHCP. This puts the MAC off the service right on your network adapter of the Synolgoy. Be careful with the ip addressing and subnetting.

Here is a snippet of my docker-compose file:

Code:
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: pihole2
    domainname: mydomain.com             # <-- Update
    mac_address: 02:42:c0:a8:0a:cd          # <-- leave out initally then add when the mac is generated from container for consitantcy
    cap_add:
      - NET_ADMIN
    networks:
      pihole_network:
        ipv4_address: 192.168.10.205  # <-- Update
    dns:
      - 1.1.1.1
      - 1.0.0.1
    ports:
      - 443/tcp
      - 53/tcp
      - 53/udp
      - 67/udp
      - 80/tcp
    environment:
      ADMIN_EMAIL: [email protected]
      TZ: America/Chicago
      ServerIP: 192.168.10.205               # <-- Update (match ipv4_address)
      WEBPASSWORD: letmein                   # <-- Add password (if required)
      VIRTUAL_HOST: piholeX.xxxx.xxx  # <-- Update (match hostname + domainname)
      PIHOLE_DNS_: 192.168.10.206#53
      REV_SERVER: "true"
      REV_SERVER_DOMAIN: xxxxx.xxx     # domain of local network router/dhcp server
      REV_SERVER_TARGET: 192.168.10.252      # ip address of local network router
      REV_SERVER_CIDR: 192.168.0.0/16        # Reverse DNS Zone
      DNSMASQ_LISTENING: all                 # Listen on all interfaces
      TEMPERATUREUNIT: 'f'                     # temperature units
      WEBUIBOXEDLAYOUT: boxed                # for working on large screens
    volumes:
       - './etc-pihole/:/etc/pihole/'
       - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    restart: unless-stopped

networks:
  pihole_network:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.10.0/24            # <-- Update
          gateway: 192.168.10.252              # <-- Update
          ip_range: 192.168.10.201/32        # <-- Update
 
Last edited:
I've done the MACVLAN setup with Portainer/Docker, so I get the gist of what you are saying, there is simply more involved with getting everything up and running. I honestly don't remember if I tested DHCP on the Portainer/Docker setup. It would be logical to me that ports 67 and 68 (DHCP server/client ports) would need to be opened up, and I recall trying that on the non Portainer docker Pi-Hole container and no luck, but none of tutorials I have seen mention needing to open them....

Your thoughts on MACVLAN benefit, as pertains to AdGuard Telos?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Looks like I triggered you somehow with my post: it was not my intention. I have no idea whether bash or...
Replies
4
Views
1,677
late follow-up on this, here is the tutorial I followed for setup and the upgrade process that is supposed...
Replies
5
Views
4,358
Replies
10
Views
4,339
Thanks... I tried something similar with rsync. The docker volume lived in...
Replies
7
Views
570
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
482
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
1,084
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
1,072

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top