fbpx

John Weland | May 6, 2020

Author

@jdngr_

PiHole: Network Overhaul Part 1

This is the first in a series of blog posts walking through my big home network overhaul. In this segment, we will discuss PiHole: what it is, how I set mine up, and why you might want to do something similar.

What is PiHole?

You may be familiar with ad-block software or browser extensions that allow you to, as the name suggests, block advertisements. That may work well for that particular browser or system. But what if I told you you could do that same thing network-wide? Block ads from mobile apps, websites, even from your smart TV?

Well, that is what PiHole is for. You install it, add it as your network’s primary name server, and voรญla. All internet traffic asks PiHole where to go. If an ad’s server is in PiHole’s blacklist, PiHole simply returns that the server doesn’t exist. Most apps, websites and devices will then simply not render a place for that ad, or render a blank section in its stead.

Why do I want to use PiHole?

In this digital age, one of the the most prized commodities for trade is our data for how, where, and when we interact with the technologies all around us. Google, Facebook, Amazon; you use these things daily. Your information is tracked and sold to companies so they know what to market to you. Ever have a conversation with somebody where you talk about some cool device or thing you heard of, and then moments later you glance at your phone or scroll by on your computer, and see an ad for that very thing?

PiHole can stop that. It can also block malicious sites, and even things like adult content you don’t want your kids exposed to.

PiHole Setup: Overview

There are a handful of ways you can install PiHole, and myriad devices you can use. The most popular is likely the Raspberry Pi, for which there are two main methods, one of which is to download Raspbian (the Raspberry Pi Foundation’s take on Debian) and then install PiHole on there.

My route is a little more in depth. I currently have a single Raspberry Pi (v4) running Ubuntu 20.04 Server. I choose to run my applications as Docker containers. You can think of “containers” as virtual machines (VMs), but without all the overhead that goes in to a VM. While there are many more differences, that’s the simplistic way of looking it. Linuxconfig.org has a nice walk through on how to get up and running with Docker.

Having things set up this way allows me to run the applications I want on my network. I can add more Raspberry Pi to the cluster for more performance, and for load balancing, if needed. While this is my preferred method, if you are not already familiar and comfortable with Docker I don’t recommend this method. At least not until you get comfortable with Docker.

There are a plethora of install guides on the internet, so I won’t be doing an install guide.

Configuration

There are three main methods for configuring PiHole. The first method works with your router, but is… limited in features. In this method, you go to each device and where you can, you manually point that device to use PiHole as at its name server.

Method Two: I have not tried this, but it involves setting PiHole to be your network’s DHCP server. If you want to follow this option, I’d suggest a Google Search and watching a few YouTube Videos.

Method Three is my preferred method. If your router allows it (and many do), you can specify your name server on your router itself. Then all traffic on your router will use PiHole as the default name server.

Blocklist

PiHole comes with a few items already added to its blacklist and you can also add any other individual URLs you want to block to that blacklist. Alternatively, you can add groups text files that contain a number of URLs to the “blocklist” under settings>blocklist. Yes – there is a blacklist and a blocklist. While they essentially have the same end result, they work a little differently. Once you’ve added any other URLs or files, you head over to tools > update gravity and PiHole will begin adding those URLs to its list of disallowed locations.

Whitelist

You may find that, after adding large groups of URLs, certain domains that you require no longer work (such as Origin, Steam, or other gaming services). You can “whitelist” given URLs to make sure they are overridden and added back to allowed locations.

The End Result

It may take a few weeks for you to fine tune your installation of PiHole, but when you finally nail it down it will be worth it. You should notice significantly less advertisements; some ad types may not be blocked, however, such as those made by content creators and added directly to their video on YouTube. Your overall internet responsiveness should improve too, as many sites with ads have horribly bloated code to load those ads. No ads loading, less bloat, faster load times.

This is a pillar for my home network, and should be for any network. It is a living thing, though, in that your needs will change and and what you block or allow will change over time as well.

In the next segment, we begin our decent into madness with the hardware choices made for the network overhaul.

2 responses to “PiHole: Network Overhaul Part 1”

  1. […] in-demand currency is information. If you take threat management and couple it with something like PiHole and maybe even a VPN you will notice a massive difference in your online experience, be it less […]

  2. […] assumes you have followed at least part 2 of this series, though we recommend starting from the beginning. While this article is written from the perspective of a UniFi Dream Machine Pro user, it also […]

Leave a Reply

Your email address will not be published. Required fields are marked *