Skip to content
Advertisements

Open Your Pi-hole

pihole-main

One of my readers recently mentioned he favorite thing to do with a Raspberry Pi was to set up Pi-hole. Having played around with Raspberry Pi for a while now I have heard of Pi-hole but had never used it. Well since I had a Raspberry Pi in my Home Automation Mix running a simple node.js to feed some audio into a Google Home from my SmartThings system I figured why not give it a try.

So lets start with what is Pi-hole? Simple, Pi-hole is a network-wide ad blocking system that runs on Linux hardware and requires no client-side software o and I should also mention Pi-hole is free to use but would recommended making a donation. With Pi-Hole setup over 100,000 ad-serving Domains are blocked automatically on any device connected to your network. This is accomplished by Pi-hole becoming your DNS server which can be configured in a few ways which is all covered on the Pi-hole site and is depended on your specific implementation so I will not go into that here.

Now that you know what Pi-hole is lets talk about how to install it which is actually pretty simple. First the prerequisites; you need a Raspberry Pi running the latest Rasbian connected to your network, because this is going to act as your DNS server when we are done I would recommend that the Raspberry Pi have a hardwired connection to your network through as few switches as possible. With that out of the way you will want to review the Pi-hole code located on the Pi-hole GitHub and run the simple one-step automated install:

curl -sSL https://install.pi-hole.net | bash

The installer will then run and ask you a few questions as it goes but that is pretty much it should take no more than a few minutes to have you up and running, well sort of.

As I mentioned earlier you will be configuring your network to use the Raspberry Pi  running Pi-hole as its DNS server. There are a couple options to do this which are covered on the Pi-hole Discourse forum. You can Define Pi-hole’s IP address as the only DNS entry in the router, Advertise Pi-hole’s IP address via dnsmasq in the router (if supported) or Manually configure each device. Since I am lazy manual configuration was out right away for me and I began looking into dnsmasq which unfortunately is not supported by my eero Home WiFi System so that left me with one option and I defined the Pi-Hole‘s IP address as the only DNS entry. I have to say though when I went to click save on this change I was nervous what was going to happen with all of my connected devices but I clicked, it saved and my network rebooted with everything connected without missing a beat.

The app for my eero Home WiFi System system is nice enough to have  speed test functionality built in so I was quickly able to see that I had not lost any speed with the switch to Pi-hole but I have never really trusted that so I ran a test myself and am pretty happy with the result:

Before:

After:

Taking a quick look at the Pi-hole admin console you can easily see the blocking power of Pi-hole, after just a few days running over 5000 queries have been blocked!

Blocking Power.png

Using IoTRant as an example you can clearly see the difference with Pi-hole on and off.

Pi-hole Off:

off

Pi-hole On:

on

You can clearly see the omission of the ads in my side bar on the right hand side of the page. Now IoTRant does not have many ads in it so there is no great bump in speed but as we all know there are sites out there littered with hundreds of ads and on these sights you can see your page load times reduce drastically.

For me however the real power of Pi-hole comes in when you start looking at the admin console. The console is filled with so many analytics you can easy spend hours geeking out over all the graphs and charts…I know I have. But the admin console also gives you the power to Disable Pi-hole temporarily if needed, you can whitelist and/or blacklist domains configure all of the settings that you setup during initial installation and even debug your installation if you run into a problem. These are the tools that every developer should give to there users!

Overall I am very happy that a reader pointed Pi-hole out to me and very happy to have it up and running on a Raspberry Pi that was not doing much for me. Are any of you running Pi-hole? Let me know in the comments below and don’t forget to sign up for our email list to stay updated with everything doing on in the IoT space.

Advertisements

Mike View All

I am passionate about the IoT and connected devices. Using connectivity to automate our lives will empower civilization to achieve greatness.

2 thoughts on “Open Your Pi-hole Leave a comment

  1. First time setting up Pi-hole awhile back I get a text from the Wife stating that the Kohl’s website wasn’t working correctly. It wasn’t allowing her to checkout. Working for a large .com company I know from time to time certain patches that cause issues with the checkout process. I told her to try again the next day as I’m sure they’ll resolve their issues, especially something as major as that. Turns out my newly implemented hardware ad blocker was the culprit. Jumped over to the whitelist file (no GUI option back then) and made sure to add Kohls.com and had her attempts a 3rd time. Sucess!!! I have it running on an older 2b but it really shines on the newer Pi 3 with all the graphs and pretty GUI’ness. This was my introduction to the Raspberry Pi and also Linux for that matter.

    Here I am years later and you can now run Pi-Hole in a Docker container, no Pi needed.

    ~Sully

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: