Pi-hole Running in Docker; Assigning Static DNS Disconnects Internet

I have Pi-hole set up and running out of Docker. I can resolve to the web GUI, I can set the DNS locally and have it provide data (Queries, Blocks, etc) but whenever I try to configure a different device to use the Pi-Hole Server as DNS, I cannot connect to the internet. All my devices on my network lose internet access when I set the router DNS to the Pi-Hole address as well.

Your debug token is: https://tricorder.pi-hole.net/k9lwp5cM/

What is the problem description? Please follow our help template.

1 Like

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Network Devices being able to Connect to my Pi-hole's DNS Server and block ads.

Actual Behaviour:

Devices connecting to my Pi-hole DNS lose internet connection.

Debug Token:

https://tricorder.pi-hole.net/k9lwp5cM/

Please post your docker-compose.yml or your docker run command line.

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"
    environment:
      TZ: 'America/Chicago'
      # WEBPASSWORD: 'set a secure password here or it will be random'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped

Any advise for me?

On a client I suspect should have Pi-hole running as it's DNS Server I get the following output for nslookup pi-hole:

DNS request timed out.
timeout was 2 seconds.
Server: Unknown.
Address: 172.16.1.146

Your docker-compose looks inconspicous.
You could consider to also set the recommended FTLCONF_LOCAL_IPV4, but it's not likely that its current absence would contribute to your observation.

Using nslookup to analyse your issue is a good approach. :wink:
However:

That output of yours may suggest that the client that ran the nslookup command would not have used Pi-hole for that DNS request.
I can't tell for sure, since the output seems truncated, and it doesn't contain the exact command itself.

Let's investigate that further:
From a client that you expect to use Pi-hole for DNS, what's the output of the following commands?

nslookup pi.hole
nslookup flurry.com

Please share the complete outpout, preferably as text.

Also, please provide a fresh debug token - your previous one has expired.

C:\Users\adeng>nslookup pi.hole
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  172.16.1.146

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out
C:\Users\adeng>nslookup flurry.com
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  172.16.1.146

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out

Your debug token is: https://tricorder.pi-hole.net/J3EqfEKA/

Run from the machine that hosts your Docker Pi-hole, what's the output of the following command:

 ip -4 address

From within the Docker Container running Pi-Hole this is the output:

ip -4 address

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
11: eth0@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link-netnsid 0
inet 172.18.0.2/16 brd 172.18.255.255 scope global eth0
valid_lft forever preferred_lft forever

My enquiry was about the output from that command as run from the machine that hosts your Docker Pi-hole, so not from within a container. :wink:

Sorry, I was confused because I cant get that comand to run on my windows machine that is hosting the docker pi-hole.

I'm not sure how I can run it for you, but here is my ipconfig on the NIC I'm connected to the internet with.

Ethernet adapter Ethernet 3:

   Connection-specific DNS Suffix  . : gateway.sasktel.net
   Description . . . . . . . . . . . : Intel(R) Ethernet Controller (3) I225-V
   Physical Address. . . . . . . . . : 3C-7C-3F-4F-12-1D
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::488e:962b:ed12:10ef%21(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.16.1.146(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, October 6, 2022 10:25:22 PM
   Lease Expires . . . . . . . . . . : Sunday, October 9, 2022 1:52:59 PM
   Default Gateway . . . . . . . . . : 172.16.1.254
   DHCP Server . . . . . . . . . . . : 172.16.1.254
   DHCPv6 IAID . . . . . . . . . . . : 708607039
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-26-6D-DE-BA-74-D4-35-EB-78-53
   DNS Servers . . . . . . . . . . . : 172.16.1.146
   NetBIOS over Tcpip. . . . . . . . : Enabled