Pi-Hole works great - but doesn't block ads on its own device

Debug token: r4qjfi1p8q

  • Raspberry Pi 4
  • Ubuntu-Mate 20.04.
  • Standard Pi-Hole installation.
  • Router: dd-wrt
  • Dnsmaq: enabled (all other dnsmasq options disabled)
  • Additional dnsmasq options:
    dhcp-option=6,xxx.xxx.xxx.xxx
    no-resolv
    server=9.9.9.9
  • Router local DNS: 0.0.0.0
  • Router Static DNS: 0.0.0.0 in all fields
  • Static leases assigned on router for all devices.

Pi-Hole functions as expected blocking ads on all attached network devices.

However, it doesn't block ads when browsing on the Raspberry Pi that hosts Pi-Hole.

Standard Mozilla Firefox browser:

  1. I've turned off all the features that might interfere with Pi-Hole.
  2. Enhanced Tracking Protection": fully disabled.
  3. Deceptive Content and Dangerous Software Protection": disabled
  4. HTTPS-Only Mode": disabled.

Also checked using Chromium browser with all 'protection' features turned off: same result.

Pi-Hole Dashboard: under Tools > Network: the Pi-Hole displays in the Green area as an active device - albeit with very few queries.

I notice in the de-bug log that DNS server 8.8.8.8 is being used... but i've no idea where that's set from? Unless Firefox is somehow causing that?

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] x-us.appbaqend.com is 0.0.0.0 via localhost (127.0.0.1)
[✓] x-us.appbaqend.com is 0.0.0.0 via Pi-hole (192.168.49.142)
[✓] doubleclick.com is 216.58.210.46 via a remote, public DNS server (8.8.8.8)

Is there anything obvious I'm missing, or doing wrong? Or is this expected behaviour - that the Pi-Hole server doesn't effectively block ads on itself. Thanks for looking.

Charlie

Additional tests:

Raspberry Pi terminal:
:~$ nslookup flurry.com
Server: 9.9.9.9
Address: 9.9.9.9#53
Non-authoritative answer:
Name: flurry.com
Address: 74.6.136.150

From windows laptop:
nslookup flurry.com
Server: pihole.lan
Address: 192.168.49.142 #this is my Raspberry Pi running Pi-Hole
Name: flurry.com
Address: :: 0.0.0.0

The Pi is using Quad9 DNS, and not using Pi-hole. If you want to have the Pi use Pi-hole for DNS, then change the nameserver for the active interface (ethernet or wlan) to the loopback IP. Then reboot the Pi and it will use Pi-hole for DNS resolution.

On a Pi running Raspbian, the configuration file (/etc/dhcpcd.conf) contains this. I don't have a running instance of Ubuntu, and your file location may be different.

interface eth0
        static ip_address=192.168.0.160/24
        static routers=192.168.0.1
        static domain_name_servers=127.0.0.1

Perfect - thanks so much for taking the time to reply :slight_smile:

1 Like