Ads not blocked on local machines, but are blocked when connected via vpn from outside the network on my phone

Please follow the below template, it will help us to help you!

Expected Behaviour:

I expect ads to be blocked on all local machines.

Actual Behaviour:

While visiting websites from devices on my local network no ads are blocked. (i set the router to use the pihole as the dns server)

Initially i still saw ads on my phone when connected to the vpn until i told my VPN server (Qnap NAS) to use the raspberry pihole as its dns server. That fixed the ads while connected to the vpn, but even thou i have told the router to use the pihole as the dns server, ads are still displayed on my phone when connected to wifi only (no VPN)

Debug Token:

iw2caahf7i

For this, since I am currently away from home, i remoted into my raspberry pi (the pihole) with vnc and navigated to a web page when prompted to visit a site. I did this on my VPN connection, but since the raspberry pi is physically on my local network i figured it would work… But it appeared to block the adds. But, when i am at home and have my phone connected to the wifi (and not connected to VPN) ads are still displayed. If i am at home on wifi and connect to the vpn, ads are then blocked like they should be.

It would be best if you choose one of your two threads which best fit your issue and close the other one.

I made two threads because i have two separate issues. One issue (this one) is the setup i have at home. Open VPN running on my qnap NAS. And pihole, Domoticz, Kodi ect running on my Pi 3.

The other thread is a Pi 2 set up at my parents house 1+hr away from me that is acting as a VPN server and pihole so i can easily remote into their network and assist them with computer issues.

Can you reach http://pi.hole/admin from a local machine? Check what DNS servers they are actually getting.

Yes I can reach the admin page from local machines. I can also reach it thru the VPN connection.

I’m not sure how to check “what dns server it’s actually getting”

I’ve verified that my router is set to use the pihole ip address as the DNS server, and the server.conf file has the pihole ip address if that’s what you mean?

If they’re able to access the web interface via that domain, then they should also be getting ads blocked. Have you tried going straight to an ad domain such as doubleclick.com? You can check the DNS server that the device is using a few ways. For windows, run ipconfig /all in the command line.

On my desktop computer (Linux Mint) I successfully visited doubleclick.com. I opened the network settings of my desktop and it shows the DNS server as my routers IP address (as it should be). I then went straight to my router’s admin page and verified that the DNS server IP is set to my pihole’s IP address (as it should be).

Sometimes the router adds in another DNS server behind the scenes, such as your ISP’s. Based on how the client handles this, ads could be inconsistently blocked or not blocked at all. Try disabling dnsmasq in your router (or whatever option will make it hand out the servers you assign instead of itself) or disable DHCP on the router and enable in the Pi-hole settings.

1 Like

Hmm after looking into that suggestion, I found that my router (linksys EA6350 smart Wi-Fi) does indeed ignore my custom set DNS servers and uses the ISP’s instead. Unfortunately DD-WRT is unavailable for this router.

This weekend I’ll either set up DHCP on the pihole or try and talk myself into finally upgrading to a real dedicated router and real wireless access point setup (currently have a couple dd-wrt routers around the property acting as WAPs)

Thank You for your help so far. It is very appreciated.

I disabled DHCP on my router (Linksys EA6350) and enabled it on my PIhole. Spent a little bit setting up the static IP’s for all of the devices on my network that I previously had the router taking care of. Well, I missed one (an IP camera that I can’t set a static IP manually on the camera itself) so in trying to get that working again I actually disabled the PIhole DHCP server and re-enabled it on the router. I left it this way for a few days because I’m still looking at getting a Ubiquity Edgerouter, and I noticed this morning that ads are now blocked on some of my local devices (my desktop and phone at least) and I’m assuming it’s all working like it should now. Maybe it won’t last, but I still have the Pihole as the DNS server in the router. Maybe disabling the DHCP and re-enabling it made it start working. Either way it’s all good now. Thanks again for all of the help and a great product!

2 posts were split to a new topic: Setup for Pi-Hole with Comcast EA6300 router