The Pi-Hole is an open source DNS sinkhole that blocks ads, trackers, and malware on a local network level. While this software can run on any Linux hardware it is best suited for running on a Raspberry Pi computer. Unlike a majority of free and open source software (aka. FOSS), the Pi-Hole project is actively maintained after over 3 years of development and has an easy and well documented install script. This project is a simple and easy way to block unwanted content on a local network.
Note: In this article we are not going to cover installing Raspbian Linux but if you are unfamiliar here is a good article
Open up the terminal emulator and execute the following commands
cd ~/Downloads curl -sSL https://install.pi-hole.net | bash
Note: Piping straight to bash will download the install file and then immediately run it, if you want to look over the source code first check out the GitHub repo
Thanks to this amazing projects automatic installer thats it! Your Pi-Hole is now setup.
In order to take advantage of the Pi-Hole there are a few methods of configuring your router to use it. In this article we will cover the easiest which is to configure your router to use your Raspberry Pi as the DHCP for the router.
Login to your router and disable the DHCP setting on the WLAN page. There are many different ways this interface is configured based off which brand of router you have. Typically the router admin page is located at 192.168.0.1 and the default login is admin and password.
Note: If this login credential is valid you should change that immediately as it is a huge security vulnerability
After disabling the DHCP setting on your router head to <raspberry-pi ip address>/admin to view the Pi-Hole web interface. Login and then head over to the settings tab. Then click the DHCP tab and check the DHCP server enabled checkbox. Now execute sudo shutdown -r now on your Pi to reboot and have the settings go into effect.
Pi-Hole Web Interface
One of the more interesting aspects to this project is the Pi-Hole interface which shows the most blocked queries, devices connected to the network, and blacklist and whitelist settings.
The Pi-Hole project combined with the inexpensive Raspberry Pi computer makes for a simple router wide ad, tracker, and malware blocker. It will help secure your local network while making your browsing slightly faster since your computer will not have to load all those annoying, potentially dangerous, ads!