After reading a post online about the benefits of a network-wide ad blocker using a Raspberry Pi, I decided to take a shot at installing one myself. I’m definitely at the lower end of the scale when it comes to networking capabilities, so I relied heavily on online tutorials through this process. Even with that, I was a bit confused at times, but I ultimately figured it out.
What You Need (Hardware)
First, I’ll outline everything you physically need. I purchased everything on Amazon for convenience:
Raspberry Pi: There are actually a few different models of Raspberry Pi’s available. You don’t need a very high-end one in order to run the ad blocker, but I decided to splurge on the 3 B+ since I didn’t know if I’d want to use it for more than an ad blocker at some point. Plus, it’s not really that expensive (around $38), even though it’s the highest end one.
- Raspberry Pi 3 B+ ($38.50): https://www.amazon.com/gp/product/B07BFH96M3/
Case: A Raspberry Pi is really just a motherboard, so you need to separately purchase a case to house and protect it. There are a lot of different options, but just make sure that it fits the model you purchased. I ended up buying the Enokay Case for my 3 B+ because I liked the way it looked.
- Enokay Case ($6.59): https://www.amazon.com/gp/product/B011RBJUOC/
Power Supply: Similarly, since the Pi is only a motherboard, a power supply is also required. I ended up settling on one by MakerSpot for about $11, because it had a long wire and I liked that it had an on/off switch on the unit itself.
- MakerSpot Power Supply ($10.99): https://www.amazon.com/gp/product/B075XMTQJC/
MicroSD: This is needed to install the Raspberry Pi operating system. I purchased a 32 GB card, but I believe the minimum is 8 GB.
- Samsung Micro 32 GB SD Card ($7.99): https://www.amazon.com/gp/product/B06XWN9Q99/
Ethernet Cable: This is really only needed for setup since you can later connect through WiFi, but you may want to keep it wired for reliability. At the very least, you need it for setup, so you may have to ‘borrow’ one from somewhere else around the house and put it back when you’re done. I purchased one that is 5 feet long, but you’ll have to determine what’s appropriate for your space.
- 5 ft Ethernet Cable ($5.99): https://www.amazon.com/gp/product/B00N2VILDM/
Keyboard & Mouse: This is also only needed for setup, so you can ‘borrow’ it as well. I just used ones I had, but here are a couple of options if you need to buy them, including keyboards that have a touchpad included. That’s probably the approach I would have taken had I needed to purchase one.
- Logitech Keyboard/Touchpad Combo Unit ($24.99): https://www.amazon.com/Logitech-Wireless-Keyboard-Control-Touchpad/dp/B014EUQOGK/
All-in, I spent about $70, plus tax, but it would have been about $95 had I purchased the keyboard with trackpad.
Note that you can actually purchase kits that include the Raspberry Pi motherboard, case and power supply (excluding the keyboard and mouse) but I decided to buy everything separately so I could see reviews for each component. CanaKit appears to be the best selling brand if you prefer to go that route (about $55 if you choose their 3 B+ kit).
- CanaKit ($54.99): https://www.amazon.com/CanaKit-Raspberry-Premium-Clear-Supply/dp/B07BC7BMHY/
Setting up all the hardware should be pretty straightforward once you have all the components, but note that your Raspberry Pi should come with two ‘heat sinks’ that you’ll have to secure to the unit. They each have adhesive backing, so it’s just a simple ‘peel and stick’ process.
Setting It Up (Software)
Step 1: Downloading the Raspbian Operating System
Now that you’ve got all the hardware organized, the next first step is to download the operating system (Raspbian) from the official Raspberry Pi website. (Note that there’s actually an ‘easy installer’ called NOOBS, but I found it easier to just install Raspbian directly since I was able to find good tutorials online).
You may find that there are even a few different download options for Raspbian, including one that comes with Recommended Software. To be honest, this option wasn’t available when I first set up my Pi, but I’d suggest just downloading the basic one and only adding the software you need separately. Note that I downloaded the Desktop version, but I believe the Lite one will work as well. Do you now see why I found this process confusing?
You’ll want to download the files to your computer (not the MicroSD card you purchased). Once downloaded, you’ll unzip the files directly onto the MicroSD card.
Step 2: Installing the Raspbian Operating System
Now that the Raspbian software has been downloaded (to your computer) and unzipped (to the MicroSD card), you’ll eject the card and put it in the slot in your Raspberry Pi. Make sure all your peripherals are plugged in (power supply, keyboard, mouse, Ethernet cable) and turn it on!
The installation process should start automatically. Once its booted up, your default credentials are username pi and password raspberry. Of course, you’ll want to change your password after setup.
Whew…we’re making progress!
Step 3: Downloading and Setting Up Pi-Hole
This may be obvious to most, but one thing I didn’t really understand when I started the process was that Raspbian was only the operating system. For some reason, I had assumed that the ad blocker would be an included function, but it’s actually a separate piece of software (also free) called Pi-hole.
We don’t download Pi-Hole on our computer. Instead we download it directly to the Raspberry Pi using either SSH (advanced) or locally. Since I’m not advanced, I installed it locally. This may still be a bit intimidating since you have to use the command line. You should see an application called LXTerminal to start the process. You’ll begin the download sequence by entering the following at the command line prompt:
wget -O basic-install.sh https://install.pi-hole.net sudo bash basic-install.sh
I basically had a YouTube video walk me through this process since there were a number of prompts to follow, but the below article also appears to outline it pretty well:
There’s a little more tweaking to be done, but that’s pretty much the bulk of the process. I personally have to make a couple of adjustments to my router settings, but this process will be specific to you, so you may have to do some additional research if you have any trouble at this point.
Once you have Pi-hole installed, you should be able to access it from any browser by going to your ipaddress/admin. For example:
http://xxx.xxx.x.x/admin/. At this point, you’ll be able to see detail on what’s being blocked, but you may want to go through the added step of expanding your block list to further reduce ads and increase security.
Step 4: Expanding the Block List and White List
To really get the most out of your ad blocker, you’ll want to have a block list and white list that works for you. I found the process to be pretty straightforward at this point (with the help of a few Google searches), but what you do should also be specific to your needs, so I won’t walk you through the steps I took. The article I linked to earlier also covers this process fairly well.
There’s a ton of info online about how to set up an network-wide ad blocker using a Raspberry Pi, but I found it difficult to really get the type of step-by-step instructions that I was looking for. I ultimately pieced it together, but I hope I was able to outline things in a way that’s better suited for true beginners.
The ad blocker works pretty flawlessly, but I do have to disable it sometimes when my kids are playing games on an iPad/phone and they have to watch an ad to ‘unlock’ something. Other than that, it’s been great, and I’d love to start learning how to do more with my Pi!