Pi-Hole can't access internet when set as DNS

The issue I am facing: My issue is that when I set my DNS to pi-hole to causes the server that pi-hole is running on to lose all internet connection to devices outside my local network.

Details about my system: Pi hole is running on a Raspberry Pi 4 and is a fresh install with nothing changed.

What I have changed since installing Pi-hole: Nothing

I can't get a debug token so here is my debug log:

(moderator edit: explicit debug log removed)

(For your own privacy and safety, don't post your unsanitised debug log publically.)

Did you configure Pi-hole as your router’s
a) upstream DNS server (commonly a WAN/Internet setting),
b) local DNS server (commonly a DHCP setting)
c) both?

Run from a client, what is the output of:

nslookup pi.hole
nslookup flurry.com

I think I configured it as a upstream DNS server and the output of nslookup pi.hole and nsloopup flurry.com is:

 $ nslookup pi.hole
Server:		192.168.0.1
Address:	192.168.0.1#53

** server can't find pi.hole: NXDOMAIN

[  6:47PM ]  [ thommomc@thommopc:~ ]
 $ nslookup flurry.com
Server:		192.168.0.1
Address:	192.168.0.1#53

Non-authoritative answer:
Name:	flurry.com
Address: 212.82.100.150
Name:	flurry.com
Address: 74.6.136.150
Name:	flurry.com
Address: 98.136.103.23

That client is not using Pi-hole for DNS, but your router at:

And from the answers, it is apparent that your router has not used Pi-hole either, or you'd have seen an IP for pi.hole and 0.0.0.0 for flurry.com.

Let's see if your client could query your Pi-hole at 192.168.0.140 directly.
What's the output of:

nslookup pi.hole 192.168.0.140
nslookup flurry.com 192.168.0.140

The output of nslookup pi.hole 192.168.0.140 is:

 $ nslookup pi.hole 192.168.0.140
Server:		192.168.0.140
Address:	192.168.0.140#53

Name:	pi.hole
Address: 192.168.0.140
Name:	pi.hole
Address: fe80::adfd:bdaf:5f49:be75

I also changed the DNS servers on my router back to the default and now the raspberry pi can access the internet again. I also know that the custom DNS settings are being respected somehow as i set secondary DNS to google's DNS and that showed up as my DNS provider on a leak test instead of my ISP's DNS.

That's looking good - so your client could talk directly to Pi-hole; no interference by your router or by a firewall on your RPi4 Pi-hole machine.

If your router supports it, you could prefer to configure its DHCP server to distribute Pi-hole as local DNS server. That would allow you to identify individual client IPs in Pi-hole's Query Log.

That may also have an impact on your observation regarding your RPi4.

We haven't looked at your RPi's DNS resolution yet, but I can tell from your debug log that your RPi's OS is using your router at 192.168.0.1 for DNS.

Currently, I'd expect that to close a short DNS loop only, as a DNS request from your RPi would be going to your router, and that would then forward it back to your RPi.
As Pi-hole would be receiving it and then forward it to its upstreams (in your case, OpenDNS), it shouldn't loop endlessly.

But let's verify that.
Run from your RPi, what are the results of:

nslookup flurry.com
nslookup flurry.com 192.168.0.1
nslookup flurry.com 192.168.0.140

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.