Pi.hole/admin returns ERR_NAME_NOT_RESOLVED but querries are still being logged

Expected Behaviour:

When pihole is working as my DNS, with querries being logged and ads being blocked, pi.hole:[port]/admin should be accessible from any client using pihole as its DNS resolver. IP:[port]/admin is working.

Actual Behaviour:

pi.hole:[port]/admin returns "ERR_NAME_NOT_RESOLVED" on both chrome and firefox.
By restarting the client, pi.hole:[port]/admin will be accessible for an indeterminant amount of time but will eventually be inaccessible.

Debug Token:

tq6aof123k

Hello,

maybe you find an answer in this thread?

I see. So in short, pihole is working correctly, is that right?

Are you able to access it directly via the IP?
I see you’re specifying a port. Are you usinrg anything besides 80?

  1. Yes. I am able to access the admin console directly via the LAN IP.
  2. I set lighttpd port to 1980 because my port 80 is being used by something else.
  3. My router requires me to have a secondary DNS server. What I see is happening is that my router sometimes switch to the secondary DNS because if I set the secondary DNS to an empty address, the behavior reported in this thread does not happen.

That is a common issue with routers demanding a secondary DNS to be set up. It sometimes bleeds requests through that DNS and adblocking basically doesn't work.

You could set-up a raspberry pi zero w as your backup DNS (with Pi-hole running) and that way you'll have a Pi-holed backup DNS (when and if, the first one fails).

Or see if the router takes a bogus IP under your secondary. The only downside of this is that if Pi-hole is offline, you don't have DNS resolution.

Here is some relevant info:

On a router that demands a second DNS server address, I entered the same DNS as the PiHole again, so the PiHole was listed twice. It appears the router just wanted some digits in that second address. All my DNS requests get routed to the PiHole.

For redundancy, what would you recommend as the best approach? I can put two Pi's on my network, each on a UPS (the routers and modems are also on UPS). One is a 3B+, the other a Zero W.

  1. On my router (which is my DHCP server), list 3B+ first, then ZeroW on the DNS list? That way, if either is offline, the system will seamlessly go to the other. I don't think I can force my router to use one before the other (Apple router), so traffic would likely go to both on a regular basis as long as they are both up.

  2. Have the 3B+ use it's internal unbound resolver first, then list the IP of the ZeroW as a second DNS server option (and use strict-control to enforce the order)? The weakness I see here is that if the 3B+ fails, there won't be any routing to the secondary.

  3. Use your chronic script to have the backup Pi-Hole pickup if the primary fails.

  1. Yes. That would be the best solution (i have that myself)
  2. You can use them as standalone resolvers. Each with it’s own unbound. You don’t neet do point any of the two to each other.
  3. The script is good and works if one of the Pi-hole devices would have been the DHCP server. In your case where the router does that, you don’t need the script.
    Just run both raspberries in paralel, each with local unbound (if you want) set their IPs as DNS1 and DNS2 on the router and you are set.
1 Like

Thanks. I'll go with Option 1.

How do you handle keeping the whitelists the same on the two devices?

I personally don’t use the whitelist.

But you could automate and (defined time) copy of the “main dns” whitelist via crontab and ssh from DNS1 to DNS2.

You can go as far as monitoring the main whitelist.txt and if the filesize changed, then copy it. Would be a little more complex to script that but it’s doable.

1 Like

Option 1 is working nicely. My backup Pihole doesn't get many hits - this setup seems to direct almost all DNS the primary Pi-Hole, which is the desired behavior.

1 Like

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