Need help understanding how to set up DNS settings for pi-hole ad-blocking at home.
Hi there and thanks for looking.
Preamble: I have experience dealing with networking things but am not an expert.
Desire for blocking ads stemmed from my kids being bombarded with ads while watching YouTube on our smart TV. Some of the ads were not age appropriate so I wanted to do something about it. Pi-hole was recommended as a whole home solution so all of your devices benefit from lack of ads and aggressive tracking scripts.
I have set up a Raspberry Pi unit at home which is running pi-hole ad-blocking software. The upstream DNS is set to Google, and everything else is set up per pi-hole setup instructions.
My router is an ASUS AC66U-B1 and has been configured to use the raspberry Pi's static IP as its DNS server in the LAN tab in the admin panel. I noticed that if LAN is configured to use the Pi's static IP then ads are blocked as expected on all devices that are wired in. My mobile devices on the other hand do not benefit from ad-blocking.
It was then recommended that the WAN portion of the routers admin would benefit from the same DNS settings. If I set up the WAN DNS to the Pi's IP then my internet connection from router to the outside world is disrupted and it cannot resolve its own IP I.e. No outside internet connection. I've seen discussions on the web where people set both WAN and LAN DNS to that of the Pi, but in my case WAN drops all outside connection.
Pretty basic up to this point. This is now where it might get interesting.
I suspected that my Hitron CGN3 modem might be the reason why WAN and custom DNS don't play well together. I have the Hitron running in bridged mode (i.e. not Gateway which provides wifi and other services like a normal router). Attempting to log into the admin portal at 192.168.0.1 or 192.168.100.1 doesn't work. I found a discussion on a Rogers forum where I have to do a factory reset in order to be able to log back into the admin panel. So I did the factory reset and yep, the panel is there as expected. I tinkered with the settings to see if I could make the DNS manual while dropping it back into bridged mode, but no success. It's just back into bridge mode, and not able to access the admin panel.
So, my assumption is that the modem is basically either all engaged, or just in most basic bridge mode.
My question is whether some of you folks have made an attempt to get pi-hole to run on your own home network and were successful in making it work network-wide via DNS rather than per-device? Am I stuck because of the modem, or is there something fundamental that I may be misunderstanding and thus configuring improperly?
Thanks so much for reading this and have a great day!
Vlado
Posted Oct 27, 2020, 12:20 AM UTC · edited
If you put your Hitron in bridge mode, then it's just a modem and forwards the dhcp information to your router. Hence, you can't change anything.
Check your wireless IP's DHCP information and make sure DNS is still pointing to your pihole and make sure mobile data is disabled while testing. Your Asus router would be the one handing out DHCP information to your wireless devices and not the Hitron. Also, double check your wireless setup does not have it's own DHCP settings.
Thanks for walking me through that, it helped to click it together. I will check the settings as you suggested and see what it looks like in more detail.
I had a look at my various devices where I could see the DNS reading. So the pihole DNS does appear as one of the DNS options (192.168.50.99). In addition to the pihole, the gateway IP also shows up as a DNS entry (192.168.50.1).
My desktop has some additional DNS entries whose origin or destination I am unsure about: 2607:f2c0::1, 2607:f2c0::2
Does this look like the DNS setup is ok, or should it only be the pihole entry that appears?
Those are IPv6 addresses. If you don't use IPv6, just disable it in your network adaptor properties.
For pihole, network settings is fine. Your issue is with your wireless devices and whether your router's DHCP configuration is pushing out the pihole's IP address as the DNS settings on each of the wireless devices.
Also, as others have stated, some phones will bypass wireless and use mobile data if the wireless' internet connection is not working.
I would review this site and see if you've missed anything:
https://blog.cryptoaustralia.org.au/instructions-for-setting-up-pi-hole/