Set up on Ubuntu, running but ads aren't being blocked

Hi, I've been trying to get this work for a while, but without much success. Pi-hole shows traffic, but no ads are blocked. I've searched everywhere for a solution, and am totally at a loss here. Any help would be appreciated. Thanks!

Expected Behaviour:
Block ads

Actual Behaviour:
Doesn't block ads

Debug Token:
tsnbuxawjf

Does /etc/resolv.conf and nslookup (server) point to your Pi-Hole? My OpenSUSE has my Pi-Hole in /etc/resolv.conf and everything is filtered as it should be :slight_smile:

OMG that worked! Thanks you so much!

1 Like

Nope.. It worked like a charm for an hour or so, and stopped, shows traffic but not blocking again

You havn't mentioned which host and OS is displaying ads ?
Your clients should be configured with only one DNS server IP through DHCP, that of Pi-hole:

pi@ph5:~ $ pihole-FTL dhcp-discover
[..]
   dns-server: 10.0.0.2
[..]

https://docs.pi-hole.net/main/post-install/

OPs problem is most likely not related to resolv.conf.
I suspect any observed changes in behaviour to be mere coincidences.

resolve.conf on the machine hosting Pi-hole is configuring where that machine (and that machine only) sends outbound DNS.

It does absolutely nothing for inbound DNS request by your clients, which are received, processed and then forwarded by Pi-hole as configured. Specifically, Pi-hole doesn't use the host machine's DNS resolver at all, but rather talks to its configured upstreams directly.

There is no harm done by having a public DNS server or your router's IP in resolv.conf, handling DNS for Pi-hole's host machine. In fact, it can be advantageous to have DNS still working if Pi-hole should be incapacitated for any reason.

deHakkelaar, OP's debug log confirms they distribute Pi-hole's IP as DNS server via DHCP:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   
   * Received 300 bytes from enp3s0:192.168.1.1
     Offered IP address: 192.168.1.62
     DHCP options:
      Message type: DHCPOFFER (2)
      dns-server: 192.168.1.62
      dns-server: 192.168.1.62
      router: 192.168.1.1

@Regev, could you please provide an example for a domain that's not blocked, together with the respective result from an nslookup for that domain from the client that is still able to access that domain?

Thanks for the replies, I think it works now.
However, I was watching the system operating since yesterday, and I'm a bit confused. It does seem to work on some devices, it works great on my mac and nslookup displays the correct DNS (Pi-hole's). On the other hand, my Android phone seems to be blocking ads as well, but nslookup shows Google DNS instead of the Pi-hole's. Same story with Android TV (tried configuring the DNS directly in the client settings, didn't work). They are all on the same network, but some devices insist on ignoring the Pi-hole's DNS address, even though it's set in the router as the only DNS. Not sure at this point if the issue is with Pi-hole configuration, or on the client side (an issue with Android devices?). Thanks a lot

When install the "Network info" app for Android, what does it show in the WiFi DNS section ?
Any other DNS servers displayed besides Pi-hole ?

Running nslookup in a Termux session on Android doesnt show the configured DNS servers correctly.
It always says its using 8.8.8.8 from Google if dont specify a DNS server.

Thanks, I didn't knew this about Termux. So now everything except Android TV seems to be working. Android TV (Mibox 3) still ignoring Pi-hole, I guess that's a local client issue, unless there is something obvious in Pi-hole's configurations that I'm missing...

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