Changed Upstream DNS Server and Now Pi-Hole Not Working

Hi, I wanted to change my upstream DNS server to OpenDNS so changed it on the Pi-Hole web interface.

After restarting the pi-hole and my router I was no longer getting any DNS resolutions via the Pi-Hole. It kept going to secondary DNS server on my router (8.8.8.8).

I reverted back to previous setting but the same thing keeps occurring - I can no longer resolve any DNS requests via the Pi-Hole.

I cannot reach the dashboard via pi.hole (have to use IP of device instead) and if I remove the secondary DNS server from my router configuration then I lose all internet access.

Debug token below - thanks in advance for your help!

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

Don't do this.

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the tun0 interface:
   10.8.0.1/24 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] t.ads.pof.com is 0.0.0.0 via localhost (127.0.0.1)
[✗] Failed to resolve t.ads.pof.com via Pi-hole (192.168.86.99)

*** [ DIAGNOSING ]: Setup variables
    PIHOLE_INTERFACE=eth0
    PIHOLE_INTERFACE=tun0
    IPV4_ADDRESS=192.168.86.99/24

Run pihole -r, select the reconfigure option and get Pi-hole configured for the correct interface and IP.

HI,

Thanks - I understand this and ordinarily would have it set to just the pi hole as the primary DNS server. I only added the secondary DNS server when things stopped working to make sure it wasn't my internet connection. Ordinarily I'd just have pi-hole as primary DNS and no secondary.

Thanks again for the reply. I have done pihole -r several times and done a repair and a reconfigure.

I have selected it to use eth0 as the interface and all requests previously came through this interface which I can see on the networks section of the dashboard. In fact it shows very clearly that the last request it received was at 07:49 yesterday (when I originally tried changing the DNS to OpenDNS).

According to ifconfig eth0 has the correct ip address (192.168.86.99).

Please post a fresh debug token.

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

Your IP problem appears to be fixed. Let's take a look at the most recent history in your dnsmasq log. Please post the output of the following command:

tail -n25 /var/log/pihole.log

Also, you should revisit your adlist choices. Several of the lists are no longer available for download:

pihole -g
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✓] Status: Retrieval successful
  [i] Analyzed 82723 domains
  [i] List has been updated

  [i] Target: https://mirror1.malwaredomains.com/files/justdomains
  [✗] Status: Not found
  [✗] List download failed: no cached list available

  [i] Target: http://sysctl.org/cameleon/hosts
  [✓] Status: Retrieval successful
  [i] Analyzed 20566 domains

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
  [✓] Status: Retrieval successful
  [i] Analyzed 34 domains

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
  [✓] Status: Retrieval successful
  [i] Analyzed 2701 domains

  [i] Target: https://hosts-file.net/ad_servers.txt
  [✗] Status: Not found
  [✗] List download failed: no cached list available

  [✓] Storing downloaded domains in new gravity database
  [✓] Building tree
  [✓] Swapping databases
  [i] Number of gravity domains: 106024 (94333 unique domains)

I'm afraid I don't think that's going to be very useful

I have smokeping running on the raspberry pi and it shows the DNS queries from (localhost) for these. It pings a bunch of sites on a regular basis which gives me an uptime/downtime indicator:

pi@raspberrypi:~ $ tail -n25 /var/log/pihole.logvar/log/pihole.log
Jun 1 18:20:03 dnsmasq[900]: reply uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.237.252
Jun 1 18:22:03 dnsmasq[900]: query[A] www.google.com from 127.0.0.1
Jun 1 18:22:03 dnsmasq[900]: cached www.google.com is 172.217.169.4
Jun 1 18:22:03 dnsmasq[900]: query[A] www.bbc.co.uk from 127.0.0.1
Jun 1 18:22:03 dnsmasq[900]: cached www.bbc.co.uk is
Jun 1 18:22:03 dnsmasq[900]: forwarded www.bbc.co.uk to 8.8.4.4
Jun 1 18:22:03 dnsmasq[900]: reply www.bbc.co.uk is
Jun 1 18:22:03 dnsmasq[900]: reply www.bbc.co.uk.pri.bbc.co.uk is
Jun 1 18:22:03 dnsmasq[900]: reply uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.237.253
Jun 1 18:22:03 dnsmasq[900]: reply uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.233.253
Jun 1 18:24:03 dnsmasq[900]: query[A] www.google.com from 127.0.0.1
Jun 1 18:24:03 dnsmasq[900]: forwarded www.google.com to 8.8.4.4
Jun 1 18:24:03 dnsmasq[900]: reply www.google.com is 142.250.187.196
Jun 1 18:24:03 dnsmasq[900]: query[A] www.bbc.co.uk from 127.0.0.1
Jun 1 18:24:03 dnsmasq[900]: cached www.bbc.co.uk is
Jun 1 18:24:03 dnsmasq[900]: cached www.bbc.co.uk.pri.bbc.co.uk is
Jun 1 18:24:03 dnsmasq[900]: cached uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.233.253
Jun 1 18:24:03 dnsmasq[900]: cached uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.237.253
Jun 1 18:26:03 dnsmasq[900]: query[A] www.google.com from 127.0.0.1
Jun 1 18:26:03 dnsmasq[900]: cached www.google.com is 142.250.187.196
Jun 1 18:26:03 dnsmasq[900]: query[A] www.bbc.co.uk from 127.0.0.1
Jun 1 18:26:03 dnsmasq[900]: cached www.bbc.co.uk is
Jun 1 18:26:03 dnsmasq[900]: cached www.bbc.co.uk.pri.bbc.co.uk is
Jun 1 18:26:03 dnsmasq[900]: cached uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.237.253
Jun 1 18:26:03 dnsmasq[900]: cached uk.www.bbc.co.uk.pri.bbc.co.uk is 212.58.233.253

I repointed my router DNS to pi-hole and then tried to access some websites - but nothing appears in the log. Browser reports DNS_PROBE_FINISHED_BAD_CONFIG

I had to repoint my DNS back to my ISP/8.8.8.8 in order to reply to your post.

It appears the problem may be with your chose upstream DNS server.

My upstream DNS server is 8.8.8.8 (Google), there is nothing wrong with it that I can tell. If I use it as the primary DNS on my router everything works fine, apart from, of course, pi-hole is completely bypassed.

This shows that Google DNS is working properly as the upstream DNS server for your Pi-hole.

If you are not seeing incoming traffic to Pi-hole, then the problem is in the network or router.

I don't doubt what you are saying but do you have any idea what the cause could be?

It was working fine until I tried changing the upstream DNS via the dashboard. Didn't change router settings at all. I can ping, SSH etc into the pi-hole so connectivity doesn't appear to be an issue.

To me it seems like external DNS requests sent to the pi-hole just aren't being responded to as any requests done from the pi hole itself are resolved correctly as you pointed out.

Thanks again

It seems that is your router's secondary upstream DNS server.
It's a valid setup to use Pi-hole as your router's upstream, but it has to be the sole DNS server, or clients will by-pass Pi-hole via your secondary.

Also, it would be preferable if your router would distribute Pi-hole as local DNS server via DHCP (provided your router supports that).

Currently, it is just distributing its own IP:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   
   * Received 300 bytes from eth0:192.168.86.1
     Offered IP address: 192.168.86.99
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.86.1
      router: 192.168.86.1
      dns-server: 192.168.86.1

It wasn't ordinarily configured that way - only when I was having issues to check that it wasn't a general network/internet problem.

I messed about it for ages trying various things. Nothing worked. I rebuilt the pi and reinstalled pi-hole which, ultimately, got it working again.

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