Pihole sometimes breaks internet connection and sometimes stops blocking ads

I'm using pihole as my DHCP server.

Expected Behaviour:

  1. Should have no problem connecting to the internet at any time.

  2. Ads should always be blocked when pihole is enabled.

  3. Disabling pihole should allow me to see advertisements, enabling should block them again.

Actual Behaviour:

  1. Sometimes turning off and then on wifi causes my mac/iphone to connect to the router but have no internet access. However, at the same time, my raspberry pi (which is running pihole) still can access the internet just fine. After about 5 minutes the apple products are again able to access the internet. This seems intermittent. Sometimes I can turn off and on wifi instantly with no problem. This also seems to occur if the router is restarted. The pi can connect to internet right away, the apple products take time.

  2. Some ads are blocked, some are not. For example ads at https://minecraft.gamepedia.com/ are not blocked. But ads at speedtest.net are blocked.

  3. If I disable pihole for a couple of minutes ads are still blocked (even after clearing browser cache). After a couple minutes it starts blocking ads (but by this time pihole has enabled itself again). Then if I want pihole to start blocking ads (after a temporary disable), ads are not blocked for several minutes/hour.

Debug Token:

a08xy1jgvy

Your debug log does not show any problems with your Pi-Hole. It is resolving received DNS queries properly.

You have DHCP_IPv6=false. It may be that the Apple devices are configured to use IPv6 and aren't able to get this address from the Pi-Hole.

Have you tried troubleshooting by moving DHCP back to the router?

This thread provides some good tools for figuring out how to block ads.

This would indicate that there is other caching happening, perhaps at the router level.

Have you tried troubleshooting by moving DHCP back to the router?

I tried using the routers DHCP initially, but could not get it to work. Below is a screenshot of my routers settings. From what I understand changing the Primary and Secondary DNS options to the pihole's ip address should be all I need to change correct? Then I should disable the piholes DHCP. Then I need to reboot the router and all devices or is that not necessary?

This thread provides some good tools for figuring out how to block ads.
How do I determine what domain an ad is coming from?

That is helpful, thanks!

This would indicate that there is other caching happening, perhaps at the router level.

Good to know, that makes sense.

Typically, yes. Sometimes you leave the second DNS blank (varies by router).

But you should also go through every menu on the router and look for DNS settings (dynamic DNS, prebinding, family friendly DNS, etc.).

It is necessary, but you also want to look in each client and make sure it's DNS cache cleared during the reboot. This will get the client to use the DHCP from the router and not from the Pi-Hole.

Solved
I was able to switch DHCP from pihole back to my router. There was a primary/secondary DNS setting under WAN settings that I had missed. It was set to default, and didn't display unless I selected to manually change it. I then rebooted the router and all client devices. Everything connected instantly to the internet.

Disabling pihole now immediately displays ads. Enabling still does not immediately block ads but, as pointed out, this is due to the router caching. I'm fairly certain this is so as checking Block Ads! right after enabling shows that adblocking is enabled.

Thank you for the help!

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