
I’ve had a Raspberry Pi sitting on the shelf since the Pi Zero W came out. It was only a tenner and I thought it would come in useful at some point… Using it on the TV with Scratch was short-lived and it’s not pokey enough to be a Plex server so on the shelf it’s sat, awaiting a role. Well, with a lot of trial and error this weekend, I managed to get Pi-hole up and running. It’s not bedded in yet but it will be network-wide so all machines in my network should get free ad-blocking.

What is Pi-hole?
Pi-hole is a set of scripts created by Dan Schaper (Co-founder and Core Developer), Adam Warner (Core Developer) and Dominik Derigs (Core Developer). It functions as a digital gatekeeper, sending all advertising-related traffic into a black hole (the hole in the name). Privacy International has this useful image:

Steps
My Raspberry Pi Zero W was about five years old and as part of this process, I had to completely reinstall it because it had been doing nothing. Once I did that, the installation nearly started, there was just one problem:

This looks pretty easy, right? The problem was that I kept getting a “basic-install.sh command not found” message – and I’m sure those of you experienced with Linux or the Pi will know precisely what I needed to do, but I wasn’t aware that I needed to tell the command what Shell I was using. My command needed to be:
sudo bash basic-install.sh
Once I did that, things went ticketty-boo for the install. I needed to perform other steps, too. These were mostly laid out in the Privacy International article linked, but the main things were:
- a) Make sure the Pi was on a static IP. This is done by editing etc/dhcpcd.conf and inserting interface NETWORK (eth0 for ethernet or wlan0 for wi-fi)
static ip_address=STATIC_IP/24 (the IP v4 address you want to use)
static routers=ROUTER_IP (the gateway address on your router)
static domain_name_servers=DNS_IP (the DNS server IP address for the router) - b) Making sure the router was addressing the Pi as static (just to be sure. Routers are all different. Check your docs)
- c) Rebooting the Pi
Once done, it just remained to go visit the Pi-hole local site to see how things were being trapped. There will be more to add, maybe even some to add to a white list.
Conclusion
It’s early days yet. I’ll see how everything shakes out and see if we start seeing fewer ads. This Pi is dreadfully underpowered so if this works, I’ll be replacing it with a beefier model that could perhaps replace the Dell server I use as a Plex server, too. The Dell is old, noisy, greedy and heats the place up a lot (not great when it’s 40°C outside).

Discover more from Ben Vost
Subscribe to get the latest posts sent to your email.