I have installed pihole on a raspberrypi3B on our home network. 2nd time I have done this, as my previous setup was crashed by a corrupted sd card. (I think anyway
)
Much relearning. Armed with a new Asus router RTAC66UB1 that I flashed with Merlin, I have the best and most complete setup I have ever had. I use my router dhcp and have all devices named through editing /etc/hosts. Enter Nest hello and chromecast with their hard coded dns .I added a Lan route rule which works on forcing them to use pihole. Thought all was good but update gravity does not work unless I disable my lan route rule for google dns. I have figured out that I probably need another lan rule for the pihole but I am lost as to how to implement that rule. Any guidance would be greatly appreciated. I suspect more information will be needed and I will try to provide it if needed.
Ron
Instead of using routes for specific DNS targets, I would recommend to redirect outbound DNS traffic to Pi-hole. If that's not possible, you could still try to block all outbound DNS traffic except for Pi-hole.
If you want to stick with your routes, don't use a rerouted DNS server as Pi-hole's upstream.
I'm at a loss how you would achieve this with your specific router. You should consider consulting your router's or firmware's support pages for help with that.
As this is not a Pi-hole issue, I'm moving this to our Community help category. You may increase your chances for finding someone with similar relevant experiences if you change your title to reflect router and firmware as used by you. ![]()
I think a better solution might be to use the DNSFilter feature on the Asus router (I have the same as you and this works great) to force those clients to your dns of choice. Set "Global Filter Mode" to "Router" to force them to use the router dns. You could also force them to another dns provider further down on that page.
The Asuswrt-Merlin docs are a bit vague on how that is actually implemented.
Would you be able to confirm whether this is done by pushing specific DNS servers to specific clients via DHCP or by setting up appropriate iptables rules (or something else entirely)?
The former wouldn't address hard coded DNS, only the latter could.
So if it's the latter, that could be just the solution that I suggested.
My reply posted at the same time yours did and I was replying to his post. Sorry about that.
I have a few hard coded devices on my network and so I am able to force them to use the dns of my choosing, be it the router, or one can also choose a specific dns provider other than the router. In my case I force a Fire TV and a Kindle to use one of my Pi-hole setups, or I can also send them to Quad9 or Cloudflare, etc. I believe this is done via iptables.
Hope that answers it.
No need to apologise at all.
I think your directions are more specific and thus more helpful than my generic advice. ![]()
I am also pleased that you actually observe some kind of redirection happening. This would make usage of iptables indeed more likely.
Thanks for the responses. I had tried the DNSfilter but it did not keep the chromecasts from bypassing the pihole for very long. It also began to show queries from the router instead of the actual device. I have reverted back to what I had before I tried to tackle the google hard coded dns. I may have given the impression that I understand this stuff, but I am lost on the suggestions and what to actually check or change. I will revisit my setup. But I do know that the pihole is doing its job.
Thanks again
not sure if this may help or if similar is possible. disregard if not applicable to you.
Netgear r7000p with dd-wrt and pihole on rasp pi (version 1)
In dd-wrt i set the DHCP DNS of the pihole as the #1 dns, then others as dns #2 and so on. And then under services set the DNSMASQ option to "Query DNS in Strict Order".
So the way i understand (as a noobie) this is the DNS that DHCP (all my devices) hands out the IP/DNS address when queried with the FIRST DNS if its available. Verified by ipconfig /all on my laptop where the only DNS available is the pihole. On phone same only 1 dns which is the pihole.
I think (not fully tested is that if the pihole being absent then the next DNS in line would be made available from the DHCP server).