Pi Hole not blocking ads

Expected Behaviour:

I installed pi hole in my raspberry pi, I also pivpn to be able to connect from my mobile.

I tried to use the ip of the raspberry pi as a DNS in windows and using OpenVPN through android.

Actual Behaviour:

I was expecting no to see ads: I do see google ads one some websites and I see ads in Yahoo (see screenshot below)

Debug Token:

https://tricorder.pi-hole.net/O2JwQANN/

Your DHCP server is not distributing Pi-hole as the DNS server. Clients are not getting configured to use Pi-hole.

** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 300 bytes from eth0:192.168.0.1
     Offered IP address: 192.168.0.71
     Server IP address: 192.168.0.1
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      netmask: 255.255.255.0
         router: 192.168.0.1
      default-ttl: 64
      lease-time: 86400 ( 1d )
      server-identifier: 192.168.0.1
      renewal-time: 43200 ( 12h )
      rebinding-time: 75600 ( 21h )
      dns-server: 212.166.210.84
      dns-server: 212.166.132.104
      --- end of options ---
    
   DHCP packets received on interface lo: 0
   DHCP packets received on interface eth0: 1

Your Pi-hole is at this IP:

*** [ DIAGNOSING ]: Setup variables
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=192.168.0.71/24

Thanks for the info, do you have a link that explains what needs to be fixed?

Do I have to check " DHCP server enabled" ?

The DHCP settings for your router are in the LAN settings section of the router configuration. Check your router manual.

Isn't it possible to configure the Pi Hole separately for each device (phone, laptop) instead of having it for the full network? That is why I didn't change any setting in my router.

Yes. Manually assign the IP of Pi-hole as the only DNS server on each client.

That's what I did and the ads in Yahoo.com & from google ads were both showing (I tried in two devices).
And the devices connected were well showing in the list of clients of the dashboard.
Is there something I need to do like adding some blocklists?

This is typically (almost always) not the problem.

When you tail the Pi-hole log, are you seeing DNS queries from these clients?

Thanks for your answer.

After connecting my Android phone to the Raspberry Pi OpenVON I do see the OpenVPN connexion.
So in my phone I opened chrome, went to Yahoo News, and I did see ads.

You can see in the picture below there are somehow just 2 queries for that client:
image

The IP 192.168.0.70 is the same device using the DNS settings in the Wifi settings.

When I click on the details of the "sandoche.pivpn" I see the following:

Is there some other log I can get to help you diagnose the issue?

Do you guys have any clue of what am I doing wrong?

Check your browser configuration: Browsers may by-pass configured DNS servers if their settings would enable DNS-over-HTTPS (DoH).

Also, it is not clear from your description what machine in your home network would handle your OpenVPN connection. You should verify that your OpenVPN server is pushing Pi-hole as DNS server, and also that it would cover IPv4 and IPv6 connections - depending on the configuration of the OpenVPN client, that client may be able to by-pass OpenVPN via IPv6.

The same may apply to your local home network if your router would advertise an alternative IPv6 address as DNS server instead of your Pi-hole's.

Hi Bucking_Horn,

Thanks a lot for your answer it does help a lot and I am making progress.

I was actually using DNS over HTTPS when I did the test from my laptop. I tried again from another browser where DoH wasn't set up and it did work I could see the requests in the admin panel and some ads blocked! So thanks a lot.

So the good news is that it works on my desktop, and later on I managed to make it work on my Android device.

Here what I tried on my device (and didn't work):

  • To put the Raspberry Pi local IP address (192.168.0.71) as a DNS in the WIFI settings
  • A few android apps that uses the VPN feature to connect to the DNS (I tried "DNS Changer (No Root)", "DNS Changer: No Root IPv6 - IPv4", "Engelsiz: DNS Changer", "DNS Changer: Mobile Data, Wifi"
  • To use the "Private DNS Mode" from android
  • To use the OpenVPN with https://www.pivpn.io/

Here is what fixed the issue:

  • I disabled both the DNS in the WIFI settings
  • I also disabled "Private DNS Mode" from android (I guess this one was the culprit)

Now it works good thanks a lot.

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