Expected Behaviour:
I am attempting to set up Pi-hole with DHCP since my router (AT&T) doesn't allow setting DNS manually.
I am running Pi-hole through Docker on a 2020 Intel MacBook Pro that runs constantly.
I assigned a static IP (192.168.1.66) to the device through my router portal and the same one in my device's WiFi settings.
Here is my initial docker-compose.yml (before DHCP):
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
environment:
TZ: 'America/Chicago'
WEBPASSWORD: '######'
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
restart: unless-stopped
This seemed to work correctly and the UI was accessible over my local network.
I then updated the yml file to enable DHCP:
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
network_mode: "host"
environment:
TZ: 'America/Chicago'
WEBPASSWORD: '######'
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN
restart: unless-stopped
After these changes, I disabled DHCP on my router, restarted it, and ran docker compose on my laptop.
Next, I tried accessing the Pi-hole UI to set up the DHCP configuration.
Actual Behaviour:
I am no longer able to access the UI at http://127.0.0.1/admin/login.php
Some of my devices (dynamic IP) are able to acquire an IP.
Logs:
Here is some of the log output.
The last 2 lines repeat many more times.
Jun 14 12:25:03 dnsmasq[258]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
Jun 14 12:25:03 dnsmasq-dhcp[258]: DHCP, IP range 192.168.1.64 -- 192.168.1.253, lease time 1d
Jun 14 12:25:03 dnsmasq[258]: using nameserver 8.8.8.8#53
Jun 14 12:25:03 dnsmasq[258]: using nameserver 8.8.4.4#53
Jun 14 12:25:03 dnsmasq[258]: using only locally-known addresses for onion
Jun 14 12:25:03 dnsmasq[258]: using only locally-known addresses for bind
Jun 14 12:25:03 dnsmasq[258]: using only locally-known addresses for invalid
Jun 14 12:25:03 dnsmasq[258]: using only locally-known addresses for localhost
Jun 14 12:25:03 dnsmasq[258]: using only locally-known addresses for test
Jun 14 12:25:03 dnsmasq[258]: read /etc/hosts - 8 names
Jun 14 12:25:03 dnsmasq[258]: read /etc/pihole/custom.list - 0 names
Jun 14 12:25:03 dnsmasq[258]: read /etc/pihole/local.list - 0 names
Jun 14 12:25:05 dnsmasq[258]: read /etc/hosts - 8 names
Jun 14 12:25:05 dnsmasq[258]: read /etc/pihole/custom.list - 0 names
Jun 14 12:25:05 dnsmasq[258]: read /etc/pihole/local.list - 0 names
Jun 14 12:25:32 dnsmasq[258]: query[A] pi.hole from 127.0.0.1
Jun 14 12:25:32 dnsmasq[258]: Pi-hole hostname pi.hole is 0.0.0.0