Pi Hole - Docker container - DHCP

Currently reading
Pi Hole - Docker container - DHCP

601
189
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

late follow-up on this, here is the tutorial I followed for setup and the upgrade process that is supposed...
Replies
5
Views
3,561
Replies
10
Views
3,506
The only one that I have in the end and that works for me on all devices (not the NAS) is "Things". It's...
Replies
2
Views
291
True! Still, there are certain containers that can be run on those machines as long as users are aware of...
Replies
8
Views
899
Who's this 'support' you're talking about? Did you miss the 'unoffical' bit in this? Or the 'NAS owners'...
Replies
9
Views
1,158

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Back
Top