pi-hole / docker-pi-hole

Pi-hole in a docker container
https://pi-hole.net
Other
8.32k stars 1.11k forks source link

unRAID Docker DNS failing after container reboot #321

Closed mbezzo closed 6 years ago

mbezzo commented 6 years ago

This is a...

Description

Pi-hole 4.0 installs and runs great, and even blocks ads for awhile! After rebooting the container, things look normal, but no clients can resolve DNS.

Expected Behavior

DNS should continue to resolve

Actual Behavior

DNS requests do not resolve, clients effectively can't browse the net as a result.

Possible Fix

never reboot?

Steps to Reproduce and debugging done

e.g. your docker run command, pages to visit, CLI commands you ran docker run -d --name='pihole' --net='br0' --ip='10.0.1.10' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'TCP_PORT_53'='53' -e 'UDP_PORT_53'='53' -e 'TCP_PORT_80'='80' -e 'ServerIP'='10.0.1.10' -e 'ServerIPv6'='' -e 'DNS1'='1.1.1.1' -e 'DNS2'='1.0.0.1' -e 'IPv6'='False' -e 'TZ'='America/Los Angeles' -e 'WEBPASSWORD'='mypw' -e 'INTERFACE'='br0' -e 'DNSMASQ_LISTENING'='all' -v '/mnt/cache/appdata/pihole/pihole/':'/etc/pihole/':'rw' -v '/mnt/cache/appdata/pihole/dnsmasq.d/':'/etc/dnsmasq.d/':'rw' --cap-add=NET_ADMIN 'pihole/pihole:latest'

  1. Setup pi-hole
  2. set router to use it as DNS
  3. Reboot pi-hole
  4. Clients can't resolve DNS

Debug steps I have tried

I've tried completely removing the container and app data folder. I get the same results - it works until reboot.

Here's the log output (truncated):

"ServerIP" => "10.0.1.10", "VIRTUAL_HOST" => "10.0.1.10",

:: ::: ::: ::: ::: ::: ::: ::: ::: ::: :: Image moved / deprecation notice :: OLD IMAGE : diginc/pi-hole :: NEW IMAGE : pihole/pihole :: In order to get the latest updates :: please update your image references :: ::: ::: ::: ::: ::: ::: ::: ::: :::

[i] Neutrino emissions detected...

[i] Number of domains being pulled in by gravity: 1101611 [i] Number of unique domains trapped in the Event Horizon: 907923 [i] Number of blacklisted domains: 1 [i] Number of regex filters: 0 [✓] DNS service is running [✓] Pi-hole blocking is Enabled [cont-init.d] 20-start.sh: exited 0. [cont-init.d] done. [services.d] starting services Starting lighttpd Starting crond Starting pihole-FTL (no-daemon) [services.d] done. ## Context and extra information ## Your Environment * Docker Host Operating System and OS Version: unRAID 6.5.3 * Docker Version: latest as of 8/21/18 * Hardware architecture: x86
mbezzo commented 6 years ago

This was a container interface issue - changing from br0 to eth0 for pihole's interface did the trick.