Pi-Hole Network-wide Ad Blocking

@dasgeek This might be a cool way to trick out your Pi-Hole

4 Likes

Congratulations on 35 years! I just had my 10 year anniversary in September!

2 Likes

I had a Raspberry Pi 2 Model B lying around so I decided to give this a try. The one thing I did differently was to put the ssh file on the SD card so I didn’t have to hook up a monitor and keyboard which worked fine. All seems to be working very well. Glad I finally found a use for this thing! Thanks for the idea @dasgeek.

2 Likes

There are a lot of uses for such devices. I have Open Media Vault on another brand of small/single board computer where I have a external USB drive connected to it on my network, using it network storage device where i keep a lot of data on.

2 Likes

This Pi-Hole system looks like something I am going to integrate right into my router / firewall. I see it as absolutely a great way to have better control over your network traffic.

2 Likes

Ordered a Raspberry Pi 4 (CanaKit) and got pi-hole up and running in no time! It’s such an easy setup, and the web interface is handy! Thank you again, DasGeek, for bringing this to our attention :clap:

Also, came across an interesting post in the Pi-hole discourse which the user claims that they are only experiencing partial ad blocking. Another user explains that DHCP is still being served through the router. Right.

I took a look at the “Network” tab of Pi-hole and noticed that some IPs were not being trafficked through Pi-hole, but recognized them, nonetheless. So maybe I was experiencing the same thing as this user? I switched off DHCP on the router and switched on DHCP for Pi-hole. Blam. All IPs were now being served through Pi-hole, and maybe a peace of mind effect happened on my end when I saw the devices light up green listed under the “Network” tab of Pi-hole’s web interface.

1 Like

It might be better if you can change the DNS server(s) being assigned by DHCP so that the first DNS server is your pi-hole and the second is a trusted DNS ( other than your ISP ).
The reason for this configuration is because, by default, after a power outage, the pi-hole does not come back online. In your config, that would cause impact to those relying on DHCP and DNS within your network.

Your router would likely come back up and restore service after a power outage and having a second DNS being assigned by DHCP would allow other(s) to continue to function.

Just a suggestion.

1 Like

Thank you for the suggestion, I may configure for that after some time using the Pi as the main. If I experience any difficulties with connectivity due to DNS settings (after a power outage or what have you), I’ll probably set up a secondary. But it’s still got that fresh feeling. Tinkering with it to see if I can get youtube video ads blocked without using AdGuard (works really well for youtube video ads).

Also looking into a little screen for the Pi… anyone got a suggestion? Mainly wanting it to show stats (mount it up on the wall to see the status of the Pi, etc.)

1 Like

I realized the same thing and also did this. Absolutely essential IMO.

1 Like

How did you put an SSH file on the SD card? I have Raspbian image burnt on an SD card, and I would like to do your method too. Plus, I’d like to know how to do that for other projects if this trick works for other things as well.

1 Like

Then click the link to Enable SSH go to step 3.

2 Likes

Thanks for the video DasGeek! PiHole is now setup. I have been to 4 websites since installing it, 205 total domain queries. It opens your eyes to how much traffic there really is.

1 Like

Are you saying to set the second DNS from here to be 1.1.1.1 for instance instead of leaving blank?

No, my advice is to use the DHCP server on your WiFi router and change the DNS servers it assigns with the 1st DNS server being your pi-hole and the second being an external DNS ( not your ISP or Google, if you care about your privacy ). I’m using Quad9 as the secondary DNS address that is assigned via DHCP.

This was if you have a power outage your network ( read as family / others on your network ) can still get internet access. Hopefully, pi-hole will fix this in a future release.

Sorry about the delay in responding to this, I didn’t see any notification for the replies.

Or someone can plug in all their network gear (like I do) to UPSs so they don’t have to worry about power failures. I have enough backup to last me nearly a whole work day.

Thanks. So basically I would do 1.1.1.1 in the second DNS entry under my PiHole’s 192.168.x.x entry right?

Has anyone else had issues with seemingly innocuous things not working? My wife keeps running into issues with things like printing store coupons and so on. I keep having to whitelist domains that when I research don’t seem to be particularly nefarious. I’m thinking the default blocklists are a little too aggressive. Are there any that cover just the major offenders?

If you want a second DNS server address assigned from DHCP that will be used if the primary DNS server is unavailable, yes.

In the event that your pi-hole becomes unreachable, for any reason, DHCP clients will get DNS timeouts on the primary and will then utilize the secondary DNS server.

There are different lists that pi-hole uses for DNS blacklisting.

Here is some info:

This is done through the webUI now, but the background info is good to read.

1 Like

I’ve been using PiHole for quite some time now. It’s very effective at what it does (sometime too effective, requiring me to whitelist sites so that my wife can get to her shopping ads via Google searches).

I have all my network devices using the PiHole as their DNS server. The PiHole in turn forwards it’s DNS requests to my router, which is setup for CloudFlare for DNS queries.

I also use the PiHole device for local DNS services as it’s running DNSMASQ and can easily serve up hostnames for your local devices (i.e. any servers or perhaps IOT devices you want to access via local hostnames and domains).