Pi-Hole cannot resolve any request

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

Expected Behaviour:

All Devices (especially Raspberry Pi running pi-hole) to block according to the hosts files.

Actual Behaviour:

No ads being blocked. Pi-hole device cannot connect to the internet.

Debug Token:

Since no internet on pi-hole, I'll just paste the whole log here.

Debug log made private by moderator

##Extra Info:
My networking setup at home is a Modem (Hitron CGN3U) to receive the internet connection, then that goes into a Router (D-Link DIR-859), which then branches out into the house (with the pi-hole connected to that D-Link Router). When I set up the Pi-Hole on the raspberry pi, then turn off DNS Relay in my Router and assign the Static IP of my pi as the main DNS server, the Pi cannot connect to the internet, and all the devices on the internet seem to be unaffected (internet is fine, but still no ads blocked). I've tried setting it up as a DHCP server, and literally none of my devices would connect to the internet.

A few problems show in your debug log - specifically the connection problem with the Pi. That is an OS level problem that you will need to resolve - Pi-Hole needs network connectivity from the Pi.

* Pinging 192.168.100.1…
[✗] Gateway did not respond. ([Why is a default gateway important for Pi-hole?](https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546))

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] slowpcfixed.co.in is 0.0.0.0 via localhost (127.0.0.1)
[✓] slowpcfixed.co.in is 0.0.0.0 via Pi-hole (192.168.100.2)
[✗] Failed to resolve [doubleclick.com](http://doubleclick.com) via a remote, public DNS server (8.8.8.8)

6 hours prior to your debug log being run, the Pi was able to contact upstream DNS servers and receive replies. Something has changed in the interval.

Jan 25 13:53:57 dnsmasq[10566]: query[A] raw.githubusercontent.com from 127.0.0.1
Jan 25 13:53:57 dnsmasq[10566]: cached raw.githubusercontent.com is
Jan 25 13:53:57 dnsmasq[10566]: forwarded raw.githubusercontent.com to 8.8.4.4
Jan 25 13:53:57 dnsmasq[10566]: reply raw.githubusercontent.com is
Jan 25 13:53:57 dnsmasq[10566]: reply github.map.fastly.ne is 151.101.0.133
Jan 25 13:53:57 dnsmasq[10566]: reply github.map.fastly.net is 151.101.64.133
Jan 25 13:53:57 dnsmasq[10566]: reply github.map.fastly.net is 151.101.128.133

I believe that was before I assigned the new DNS server on my router. When I set the Primary DNS server to 8.8.8.8 (google) on my router, I believe the pi-hole gets an internet connection back.

Here are some image references on my router. The IP (192.168.100.2) is static.
image

I set a secondary DNS Server to make sure that if the primary ever goes down for whatever reason, the second will (hopefully) take over.
image

I'm not sure what else to provide to proceed, sorry...

This is not the way it works. The primary isn't strictly a primary, and the secondary isn't strictly a secondary. Given multiple DNS options, clients will use any of them.

This seems odd. The internet connection for the Pi should be independent of the DNS server in use. For example, on the Pi if you ping -c5 8.8.8.8 , no DNS resolution is required and the ping should go directly to the IP. It is only when you ping -c5 dns.google that the DNS resolver gets involved to provide the IP 8.8.8.8.

You will need to do some more work with your router to get the Pi back online.

Edit - one more thought. What is the nameserver in use by the Pi:

cat /etc/resolv.conf

Hm, interesting. I guess I don't know as much about networking than I thought, haha, but what you're saying makes sense.

This is not the way it works. The primary isn’t strictly a primary, and the secondary isn’t strictly a secondary. Given multiple DNS options, clients will use any of them.

I don't have the ability to do this right now, but I'll get around to doing removing the secondary one asap.

This seems odd. The internet connection for the Pi should be independent of the DNS server in use. For example, on the Pi if you ping -c5 8.8.8.8 , no DNS resolution is required and the ping should go directly to the IP. It is only when you ping -c5 dns.google that the DNS resolver gets involved to provide the IP 8.8.8.8.

I attempted that, and the response I got was:

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 204ms

Edit - one more thought. What is the nameserver in use by the Pi: cat/etc/resolv.conf

The nameserver is 127.0.0.1.

Thanks a bunch for the timely responses by the way, I appreciate it a ton.

1 Like

Weird, so when I changed the DNS server to be just the pi-hole, nothing worked, which must mean that the pi-hole doesn't get an internet connection. However, when I set the DNS of my router to 8.8.8.8, the pi-hole is able to easily get an internet connection. I don't know what to do, this just doesn't seem right to me.

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