[Solved] Cannot set router DNS to local pi-hole

Details about my system: I'm using a dedicated, headless RPI B3+ with an ethernet connection to the router (a TP-LINK AC750).

The issue I am facing: I'm new to Pi-hole, and this is my first effort at setting it up. I cannot seem to point my router's DNS Server to my RPI where Pi-hole is installed. When I attempt to, I get this message:

Error code: 5917

Error Unknown!

I've played with multiple DNS settings, and I'm guessing the router wants an external IP for DNS resolution. But my RPI is local, lol. Any ideas what I can try? I really don't want to get into using DDNS (like no-ip), but I can't think of any other solutions.

What I have changed since installing Pi-hole: After experiencing this problem, I upgraded the router firmware just in case it was a known bug. No joy.

I found this article that might help. It seems the obvious DNS settings are for the wan and the one you need for pihole would be under DHCP?

AFAIAAO, some TP-Link routers do not allow to use private IP addresses as an upstream resolver.

Having your clients talk to your Pi-hole directly would be the preferred configuration anyway, i.e you should configure your TP-Link to distribute your Pi-hole machine's IPv4 via as local DNS resolver via DHCP instead of its own, see e.g. Can't setup network-wide DNS because of router - #8 by Bucking_Horn.

Wow, fast replies!!

CallMeCurious, thanks but I tried that already. Ironic that their own directions don't work - at least for me. :upside_down_face:

Bucking_Horn, thanks for that link! I promise I did make thorough use of the search options before posting, and didn't find that one. I'll go through this and post an update when I have one. (Won't be right away - with little kids, I rarely have opportunity to sit down at my computer these days.)

(Sorry - new user here. I can't @ mention anyone yet.)

1 Like

Half TP-Link's routers are called AC750. I Iooked at the TP-Link emulator at TP-Link Emulators | TP-Link United Kingdom and on a couple of models of routers described as AC750 in advertising media it was possible to disable the routers DHCP server.
Advanced - network - LAN settings or DHCP server
It I was in your position I would configure and enable the DHCP server within pihole, disable the DHCP server in your router and then test on one client by restarting the client and looking at its network settings. If it has working internet access and it has picked up the pihole as your DNS server then you are good to go with all your clients once they are restarted

I was looking at this on the net and it seems to have to do with DNS Rebind Protecton which doesn't allow you to have a DNS server on the same subnet as Bucking_Horn mentioned..

I found an interesting comment on Reddit https://www.reddit.com/r/pihole/comments/cz2d7l/tplink_dns_rebind_protection_solution/

That is a few years old and I really doubt it works but hey, you never know.

Disabling the Routers DHCP and letting the PI do it as Moto mentioned is probably the best solution if you cant set the DNS on the TP-Link.

I'm using CleanBrowsing's Family DNS filter (which is oddly not a built-in on the Pi-hole). It blocks adult content, malicious domains, and mixed content - including Reddit. It's great for family-safe browsing, but I also can't access any Reddit links. Can you paste the relevant text here? If not, I'll check from work on Monday.

I did spend a quick 2 minutes setting the DNS Server back to automatic, and then re-assigning it from the DHCP section. It may be working - it at least didn't throw any errors this time - but I haven't had time to do any testing yet either.

Here is the text from the link. It was short and too the point.

TP-Link router don´'t allow you to have dns server on the same sub domain. But you can fix it. Turn of DHCP and put in your ip to Pihole in the field for DNS. Turn the DHCP on and you are ready to go.

As mentioned I would be amazed if it worked but firmware can be buggy so you never know.

Well, this is an unusual day! The kids are playing happily, and I've had a few more minutes at the PC! :grin:

Anyway, thanks so much! I set the DNS server in the DHCP area, and it works! I have only really tested the PC, but when I turned on the Roku there was no ad on the homescreen - exactly what I've been looking for!! I'm going to keep an eye on things, but so far it's working as expected.

Thanks again!

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