Setup
ISP router has DHCP with a static reservation for my internal router, which is attached via ethernet to the WAN port, and is the only thing connected to it.
From now on, whenever I say “router” I mean the internal router, the ISP router is basically just forwarding.
Internal router has DHCP with static reservation for PiHole on 192.168.X.Y
Internal router has DNS set to PiHole @ 192.168.X.Y
Expected Behaviour:
I would expect DNS to be resolved to an IP, instead I only get “REFUSED” and nothing works (can’t connect or resolve anything).
For the purpose of this thread let’s use this config:
- Raspbian-lite (fresh install)
- Raspberry 1B
- Bare metal from apt
Actual Behaviour:
Nothing works. All DNS queries are “REFUSED”
I see a lot of: UDP DNS reply: Timeout - no response from upstream DNS server, Connection error: TCP connection failed while receiving payload length from upstream, WARNING: Connection error (2606:4700:4700::1111#53): failed to send UDP request (Network unreachable)
If go in the router and set Cloudflare (1.1.1.1) or Google (8.8.8.8) as DNS from there (instead of the PiHole), everything works, so it seems to be an internal issue and not related to the router, ISP, or DNS provider.
I have re-installed several times and this is based on a fresh install (Raspbian + apt). The same happens on a “clean” docker install, where I have deleted all folders, volumes, networks and pulled a fresh image.
I have also reset my router several times to make sure that no useless settings were in place and I do think there’s nothing weird in the router itself as evertying works when I switch to DNSs other that PiHoles.
From inside the raspbian system
-
with router DNS pointing to cloudflare:
dig pi-hole.net=>NOERROR
dig pi-hole.net @127.0.0.1 -p 53=>NOERROR -
with router DNS pointing to it (192.168.X.Y)
dig pi-hole.net=>timed out
dig pi-hole.net @1.1.1.1=>timed out
I’m not sure if this has anything to do with it but I’ve disabled IPv6 on my router, and if I do enable it (with Dynamic IP SLAAC/DHCPv6) and point the DNS to cloudflare’s IPv6, then everything works but it just bypasses the PiHole (I can curl doubleclick.com), just as if I were to replace the router’s DNSs with cloudflare’s.
Debug Token:
In order to upload this log, I had to timely switch the DNS in my router to 1.1.1.1 just before pressing y for curl
https://tricorder.pi-hole.net/PTLHUmxL/
Please help out, I’ve lost a gigantic quantity of time trying to make this work on my own and scouring the internet for similar cases before opening this thread.