Hello everyone,
I have problems actually blocking ads with pi-hole.
I am currently running pi-hole together with unbound on a VM running Ubuntu 24.04.1 LTS (Server).
My router is a Telekom Speedport Smart 4.
I have pi-hole set up as DHCP-server and disabled the DHCP-server in the router. I set up pi-hole as preferred DNSv4 and DNSv6 servers inside my router. The option for the router to use a ULA is turned on. The upstream DNS servers inside pi-hole for IPv4 are 127.0.0.1#5335 and not set for IPv6.
For unbound I used the default config file as proposed here.
So it seems like it should be working, but somehow I still get ads served after all.
Expected Behaviour:
I expect pi-hole to block ads and have them not shown.
Actual Behaviour:
When visiting pages with my laptop, pi-hole logs show blocked queries, but the corresponding ads are still served. When visiting the same pages with my phone, ads are shown, but pi-hole logs are not showing blocked queries either.
I am totally lost at this point. Any help is highly appreciated!
Edit: Some information I wanted to add, but forgot to put in the original post:
The connection to my laptop is wired. The laptop runs Ubuntu 24.04.1 LTS. One problem I just noticed is, that /etc/resolv.conf shows too many DNS servers configured.
The phone is on wifi. The private DNS setting on the phone is set to off.
Likely, all of those belong to your router, demonstrating that your router is advertising its own IPv6 address as DNS server, allowing your clients to by-pass Pi-hole.
You'd have to find a way to configure your router to stop advertising its own IPv6 as DNS server, or to advertise your Pi-hole host machine's IPv6.
You'd have to consult your router's documentation sources on further details for its IPv6 configuration options.
If your router doesn't support configuring IPv6 DNS, you could consider disabling IPv6 altogether, provided you'd not depend on IPv6 for reasons.
If your router doesn't support that either, your IPv6-capable clients will always be able to bypass Pi-hole via IPv6.
You could then try to mitigate this, by setting Pi-hole as the only upstream of your router, but note that you won't be able to attribute DNS requests to original individual IPv6 clients in that configuration.