I've installe pi-hole today and for some reason, tpc.googlesyndication.com and googleads.g.doubleclick.net are getting through. The site I test is https://www.demorgen.be/.
Something I noticed is that these ads are all loaded inside an amp-img.
The list maintainer selectively whitelists domains and does not publicize the domains they choose to whitelist. Domains that you would expect to be blocked are not always blocked. I would ditch these lists and select from more reputable lists here: https://wally3k.github.io
Of the two questionable blocklists, only the second one is enabled. Let's check that list to see if it contains the two domains; and find it does.
pihole -q tpc.googlesyndication.com
Match found in https://dbl.oisd.nl/light/:
tpc.googlesyndication.com
tpc.googlesyndication.com.proxy.c9w.net
pihole -q googleads.g.doubleclick.net
Match found in **https://dbl.oisd.nl/light/** :
googleads.g.doubleclick.net
The regex you have crafted are incorrect:
You have .*googlesyndication.* , which does not block tpc.googlesyndication.com
Add googlesyndication.com as a wildcard blacklist entry, and Pi-hole will convert that to the following regex which does block that domain.
(\.|^)googlesyndication\.com$
If the browser you are using is able to load these domains, then the DNS queries for that browser are not going to Pi-hole. This can be caused by a few things:
The browser is using a DNS other than the DNS provided by the client OS (i.e. DNS over HTTPS).
The client is not using Pi-hole for DNS resolution.
From the client command prompt or terminal (and not via ssh into the Pi terminal), what are the outputs of the following:
pihole -q tpc.googlesyndication.com
Match found in regex blacklist
(\.|^)googlesyndication\.com$
Match found in https://adaway.org/hosts.txt:
tpc.googlesyndication.com
pihole -q googleads.g.doubleclick.net
Match found in https://adaway.org/hosts.txt:
googleads.g.doubleclick.net
I've removed the regex as suggested and match is confirmed in 2.
It somehow got fixed by restarting the troubled pc. It was a company pc which was running under a VPN before. Restarting removed the VPN and now adds are gone. Not sure if it will return after enabling the VPN but now I probably know the cause at least.
It will. When a client device is on a VPN service, the DNS for that device moves to the DNS of the VPN service as well, to prevent DNS traffic outside the VPN tunnel.