New PiHole Installation - Only Partially Blocking Ads

Hello all!

First and foremost I want to say that I'm a 100% absolute newb at Rasberry Pi's and the FOSS community. I grew up with Windows, but have decided to go full Open Source to develop a better understanding of these systems, and to generally have more control of my data. :nerd_face:

But I have no formal education in technology - but am 100% willing to learn and persevere. Any and all help is greatly appreciated, and patience and I don't necessarily understand every aspect of these systems yet.

Expected Behaviour:

To begin with, I used this tutorial to setup/configure my Raspberry Pi:

I also modified my router to accept the new DNS routing:
router_dns_information

I have also added all of my network devices to the PiHole DNS list:

After following the tutorial and configuring everything, I rebooted the Rasberry Pi. After I log into the PiHole Dashboard I'm seeing activity, and from what I can tell.

Actual Behaviour:

When I start to 'test' if the PiHole is functioning properly, I don't seem to be getting consistent results. For example if I visit Engadget.com the main banner Ads seem to be gone:

However, when I try to go to other sites and test like MSN I'm still seeing Ads:

It's great seeing this work in some cases, it really makes the overall internet-surfing experience more enjoyable. However, I'm curious as to why this isn't consistent? Shouldn't the PiHole be removing these Ads no matter what? I just assumed literally every Ad would be gone - do I have a misconfiguration?

Debug Token:

https://tricorder.pi-hole.net/8er5f58mek

You have made entries in the DHCP page of the Pi-Hole, but from your debug log you don't have the DHCP function of Pi-Hole enabled. Your router is doing the DHCP and is passing out the Pi-Hole DNS to clients. But, some routers also pass out an IPv6 DNS that allows clients to bypass Pi-Hole. This might account for the inconsistent performance - sometimes the DNS requests go to Pi-Hole and get filtered, sometimes they don't.

Let's take a look at the activity going to Pi-Hole. Run these commands from the Pi terminal and post the output here (you can copy/paste into a reply):

echo ">stats" | nc localhost 4711

echo ">top-clients withzero (15)" | nc localhost 4711

@jfb here is the output from the commands you've listed:

pi@raspberrypi:~ $ echo ">stats" | nc localhost 4711
domains_being_blocked 116524
dns_queries_today 5585
ads_blocked_today 548
ads_percentage_today 9.811996
unique_domains 1205
queries_forwarded 3567
queries_cached 1470
clients_ever_seen 5
unique_clients 5
dns_queries_all_types 5585
reply_NODATA 37
reply_NXDOMAIN 355
reply_CNAME 503
reply_IP 251
privacy_level 0
status enabled
---EOM---
pi@raspberrypi:~ $ echo ">top-clients withzero (15)" | nc localhost 4711
0 3433 192.168.0.1 
1 1370 192.168.0.3 
2 645 192.168.0.2 
3 172 127.0.0.1 localhost
4 1 192.168.0.9 raspberrypi
---EOM---

I believe I understand what you're saying about my router still being responsible for DHCP due to my settings. However, I have a general lack of knowledge when it comes to networking....Can you answer me this:

If I configure the PiHole to handle all of the DHCP routing, will I be at risk of overall network performance decreasing? Please help me understand this, as my fear is I'll be losing bandwidth performance?

Or to put my concern more simply, if I disable DHCP on my router and enable it on the PiHole what is the possible fallout? I don't want to wreak my network or disrupt service to our devices at home.

Sorry for all these newb questions @jfb like I said, I'm very very new to this.

No. When a client joins your network, they look for any DHCP server broadcasting on the network and ask for an IP address. The DHCP server and client do some transactions, and the client gets an IP and a DNS server assignment. It's a fairly simple process, and any DHCP server can do it. There are no performance hits, since the DHCP process is done fairly infrequently for each client (on initially joing the network and near the end of the DHCP lease period).

None of the actual network traffic goes through either Pi-Hole or the DHCP server. The Pi-Hole sits on the network like any other client and listens for DNS queries. It is acting as the phone book. When a DNS query comes along (what is the IP of pi-hole.net, as an example), Pi-Hole provides the IP. With the IP in hand, the client goes directly to the router with the request for that IP, and the router goes to the internet to make the connection. All of that traffic is independent of the Pi-Hole, so there is no bandwidth hit. In fact, since Pi-Hole blocks domains that serve ads, the client is actually loading less data from the internet, and your net bandwidth use through your router and ISP is lower.

None. Either of the two devices is equally capable of serving DHCP.

1 Like

@jfb first thank you very much for such a detailed explanation of all of my questions!

I have disabled DHCP on my C3000z router:

Then I enabled DHCP on the PiHole:

So I guess my next question is - how do I verify that this is working as it should from a DHCP perspective?

Here is an updated Debug Token with the changes I've made:
https://tricorder.pi-hole.net/bemqa5e2bv

I guess what I"m curious about, and trying to verify is that I'm "only" seeing a 4.8% blocking percentage. Shouldn't this be up near 100%? Or am I misinterpreting what this information is telling me?

All the traffic from all your clients will be shown in the Pi-Hole query log.

You are misinterpreting. The only domains that are blocked would be on your blocklists. The real story is in the query log - if the domains that should be blocked are blocked, all is well. You can easily have a chatty client request the same domain over and over, and if the domain is not blocked, that skews the statistics.

In real time, you can tail the pihole log and see all the queries from clients, along with the replies to the queries. The best way to do this is from the Pi terminal with pihole -t

1 Like

Awesome. Again, @jfb thank you so much for your help on this today! I've got everything configured and I'm all set!

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