Raspberry Pi Zero Pi-hole Set Up Installation

Raspberry Pi Zero Pi-Hole Set up

A few months ago I purchased a Raspberry Pi Zero with the intent of getting rid of a power hungry server I have in the basement. I use the server for several things: 1. it is a file server that we store all sorts of pictures and documents on. It gets backed up each night to the cloud so I know all our documents are safe and I can access them when ever I need to. 2. the server is hooked up to our color laser printer. I bough this printer many many years ago in another business and it has been a work horse for more that 15 years. It has all the features I could ever want and has just worked for all these years. Ok I had to replace a few parts that wore out, but I am not going to complain. After looking at the Pi Zero I decided to not go the route of replacing the server. At least for the time being and use it for anything else. I just didn’t know what that would be, until….I decided to try a Raspberry Pi Zero Pi-hole set up.

Skimming through reddit I came across a post about “the best things to buy under $50” and using a Raspberry Pi to block ads on your entire network caught my eye. They talked about this software called Pi-hole. Pi-hole is a DNS server software that blocks ad domains on your entire network. WHAT EVIL IS THIS? I am all for ads I use them on this site and a few others to make money so blocking ads isn’t my favorite thing in the world to do. I also hate the number of ads and how intrusive they can be. Especially on Facebook and some other social networks. Placement of ads is something for another post.

Let’s get to the good part, Raspberry Pi Zero Pi-hole set up. This literally took me less that 20 minutes to do. I wasn’t 100% sure the Zero would be fast enough to run as a DNS on my home network, but I figured I would give it a try and see what happened. I wasn’t out anything if it failed or slowed down my network at all and would just take it back out and live with the ads.

My hardware consisted of: a Pi Zero (original not a W), a Case, 4GB SD card with Jessi Lite flashed already, and a Ethernet Hub/USB  Hub. My Zero is without WiFi and I am not sure I would want to add this type of device to the WiFi. I also used an old cell phone power supply I had laying around for power.

Pi Zero setup

The first issue I had was, I didn’t have an HDMI monitor to hook to the Pi Zero for set up. (Yes I know I still live in the dark ages of monitors.) This wasn’t a huge issue, I just didn’t know how to set up a headless system like this. After a little Google-foo I found out that Raspberry Pi’s have SSH off by default as a security feature. This is simple to get around by accessing the SD card on my Windows machine and adding an empty file named SSH with no extension to the root directory. Plug it into the network and find the IP address on your router. Fire up the Pi Zero on the network, Putty to the IP address and log in. The root username and password are pi and raspberry. I would suggest changing the root password as soon as you are in.

Pi-hole setup

The second thing is to download the Pi-hole software to the Zero. This too was pretty simple. Using the following command:

It took a few minutes to download. Once downloaded there are several setup options that Pi-hole asks during the set up and truthfully you can leave most of the defaults because you can change all of them through the admin page. When all is complete the Pi-hole will show you a final configuration screen with the address to the admin page and password. You will want to copy the password down somewhere as you will need it later and it can’t be recovered if you lose it.

Pi-hole final screen

Router settings

The last part was even easier. Log into your routers admin site and set the DHCP settings and set the primary DNS server to your PI’s IP address. Save it and reboot your router just to be safe.

router settings for pi-hole

Pi-hole Admin Page

You can then navigate to the Pi-hole admin page that was given to you after setup. You should start seeing some results. The counts will start going up as you start using the network. It took about an hour for all of our devices to adjust to the new DNS server, but after that  I could see a noticeable increase in network speed. I started going out to Facebook and would go to a page that I knew would have a ton of ads. There was nothing but clean content and no intrusive ads all over the place. Even the ads on our Roku where gone and it allowed us a better streaming experience.

Raspberry Pi Zero Pi-Hole Set up
Raspberry Pi Zero Pi-Hole Set up

Pi-hole admin log in

You can log into the admin site using the password provided earlier in the setup. This will give you access to other reports and settings that you can change if you didn’t get it quite right during setup.

[AdSense-A]

Final thoughts

I was pleasantly surprised that the Raspberry Pi Zero Pi-Hole set up handled the traffic without any hiccups and the speed of our network increased drastically.  The Pi-hole admin interface has a handy little status section to tell you how hot the Pi is and how much of a load is on it at any given point. After a couple of hours you will start to see the graphs and other information being populated. You will get fun stats like the top using IP address and top advertisers blocked.

Words of caution

This isn’t an end all setup. I still get the occasional ad that gets let through and I am ok with that. Pi-hole doesn’t work on Hulu ads at the moment, again not really a deal breaker for us. Also if there are sites that you are use to having access to and you no longer do. The site may need to be white-listed within the Pi-hole to allow it through. Finally I have noticed if you use “Google” as your upstream DNS you may miss some sites as well. I would recommend OpenDNS instead. OpenDNS just seems to function better and let the correct sites through.

There you have it. Pi-Hole runs on the Raspberry Pi Zero without any trouble. Here to enjoying life with a few less ads using your Raspberry Pi Zero Pi-Hole set up. This excited me to see what other useful projects I could find for a Raspberry Pi.

[AdSense-A]

 

Update: 02-14-2018

I thought I would give my impression after running it for almost a year. My first impression was “wow” this thing is incredible. The network is faster and more stable and I don’t have all the ads clogging it up. As the year went on there are a few issues with installing the pi-hole on your network. Probably not really deal breakers but things that I didn’t know when I started the project.

First, It will block Google ad results.

The first few results in the Google’s search are typically advertisements. This doesn’t mean they don’t show up or that you can’t click on them. It means that when you click on them they will be blocked. Not always a bad thing but every once in a while there is an ad that is kind of relevant to my search and I can’t click on it to get any information. So no advertising dollars from me clicking on ads.

Second, streaming doesn’t like the pi-hole.

I wanted to watch the 2018 Winter Olympics on the NBC sports app for Roku. I am a cord cutter and don’t really pay for cable or anything like that. I did purchase 2 months of Sling to get a free Roku and watch the Olympics on the NBC Sports app. With the Pi-Hole running the NBC app just spins never loads. Streaming companies like Hulu and Netflix are not affected by the Pi-Hole they will load just fine. They will still include ads the Pi-Hole doesn’t block those kinds of ads. The NBC app was affected by the Pi-Hole and would not even load the content with it running. This was kind of a deal breaker and I am disabling the Pi-Hole for the two weeks the Olympics are on.

Finally, you have to keep up with it.

If you don’t log into the Pi-Hole once in a while the black list of ad sites doesn’t get updated. There is no way (currently) to automate this process through the Pi-Hole UI. It also seems like the past few months the list has not grown. The first few months I had everything set up and running I would update weekly and it would add about 1k new sites to the list. I am not sure if it is because there are several sites that I white-listed but the black-list list hasn’t seemed to grow the past few months.

The Pi-Hole set up isn’t for everyone and if you are not at least a little technical I would advise seeking help setting one up.