Appreciate any help! I know this must be a simple problem to solve. I’ve setup PiHoles on Raspberries and Synology NAS (with macvlan) in the past without a problem.
This time I wanted to run my PiHole on an M1 MacMini I have which is on 24/7 using Docker Desktop
What works:
- Static IP on MacMini is set to 192.168.4.100
- Installed Docker for Silicon from Docker website (version 4.24.2 (124339))
- Installed PiHole using
docker run -d --name pihole -e FTLCONF_LOCAL_IPV4=192.168.4.100 -e TZ=Australia/Melbourne -e WEBPASSWORD=PASSWORD -e DNS1=1.1.1.1 -e DNS2=1.0.0.1 -p 80:80 -p 53:53/tcp -p 53:53/udp -v pihole_app:/etc/pihole -v dns_config:/etc/dnsmasq.d --dns=1.1.1.1 --cap-add=NET_ADMIN --restart=unless-stopped pihole/pihole:latest
- docker ps -a gives “healthy” response
- Can access PiHole web interface at localhost/admin/login.php and at 127.0.0.1/admin/login.php on the MacMini, and at 192.168.4.100/admin/login.php from other local computers.
What doesn’t work
The problem is that when I set the router DNS to 192.168.4.100, I lose connection to the internet.
From another local network computer
nslookup flurry.com 192.168.4.100
;; connection timed out; no servers could be reached
Debug output includes:
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] regboyan.com is 0.0.0.0 on lo (127.0.0.1)
[✓] regboyan.com is 0.0.0.0 on eth0 (172.17.0.2)
So it appears that PiHole container is working within Docker, but isn’t able to be used as a DNS server by the router. Does anyone have any ideas? I’ve seen older posts about similar problems but most apply to older versions of Docker.