Cannot access http://pi.hole/admin, getting DNS_PROBE_POSSIBLE

I set up pi-hole through docker on my Pi using the instructions at Docker - Pi-hole documentation. I've set up my TP-Link DHCP Primary DNS to my Pi. Testing and looking at the dashboard, Pi-Hole appears to be working, but http://pi.hole/admin does not resolve, I can only access the dashboard using the ip address directly.

Expected Behaviour:

I expect http://pi.hole/admin on my local network to open the dashboard.

  • Raspberry Pi OS Lite 64-bit

  • Raspberry Pi 3B+

  • Docker compose file:

    # 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
        ports:
          # DNS Ports
          - "53:53/tcp"
          - "53:53/udp"
          # Default HTTP Port
          - "80:80/tcp"
          # Default HTTPs Port. FTL will generate a self-signed certificate
          - "443:443/tcp"
          # Uncomment the below if using Pi-hole as your DHCP Server
          #- "67:67/udp"
          # Uncomment the line below if you are using Pi-hole as your NTP server
          #- "123:123/udp"
        environment:
          # Set the appropriate timezone for your location from
          # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, e.g:
          TZ: 'America/New_York'
          # Set a password to access the web interface. Not setting one will result in a random password being assigned
          FTLCONF_webserver_api_password: 'pihole'
          # If using Docker's default `bridge` network setting the dns listening mode should be set to 'ALL'
          FTLCONF_dns_listeningMode: 'ALL'
        # Volumes store your data between container upgrades
        volumes:
          # For persisting Pi-hole's databases and common configuration file
          - './etc-pihole:/etc/pihole'
        restart: unless-stopped
    
  • Docker version 29.9.3, build 5457199

Actual Behaviour:

Navigating to http://pi.hole/admin returns a DNS_PROBE_POSSIBLE error

Debug Token:

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

And what is the Secondary ?

What kind of device/OS are you using to test with ?

It's best to enter the Pi-Hole IP Address in all possible LAN DNS Server fields at your Router's webGUI to avoid for example Android phones still using Google DNS Servers from time to time !!

Thank you for the reply. My secondary DNS was 0.0.0.0, I've updated it to also be my raspberry pi IP address, but unfortunately I'm still unable to reach pi.hole, though today I'm getting a `ERR_CONNECTION_ABORTED` error.

I'm testing from the Brave browser on Linux Mint as well as Brave browser from my Samsung S24.

Could you try a different browser ?

Unfortunately Chrome and Firefox are giving the same results.

Ok, I think I found the issue but unsure how to fix it:

host pi.hole is returning pi.hole has address 172.18.0.2 which looks like the docker container's internal ip address, not the correct local ip address. So I'm guessing pihole has that record set somewhere internally, unaware it's sitting in a docker container.

Does anyone know either how to update this record is how to configure the docker container to correctly translate this address?

Got it, it was because the docker container was running in bridge mode by default. Swapping it to host mode in the compose.yaml config with network_mode: host as outlined in the docs here solved it!

Just wanted to add that I found another solution if you don't want to set your network_mode to host. If you just want to force http://pi.hole/admin to resolve to the dashboard, you can set the environment variables in your docker compose file like this:

environment:
  # Force http://pi.hole to resolve to the local Raspberry Pi IP address (instead of Docker container's internal IP)
  FTLCONF_dns_reply_host_IPv4: '<PI-HOLE'S IP ADDRESS>'
  FTLCONF_dns_reply_host_force4: true

Replace <PI-HOLE'S IP ADDRESS> with the IP address you would use to access the admin dashboard directly.