Pi-Hole

Pi Hole

I had my Raspberry Pi lying around doing nothing. I’ve had a version 1 since they were released and I’ve had a version 2 for a while as well (in fact, I’ve been through two version 2’s). I’ve had this one in the draw for a while now doing nothing - it’s not really seen the light of day since I purchased my Synology DS116 as I had been using it as a home server and accessing my documents via SFTP outside the house.

However, after I stumbled across the Pi Hole project, I decided that it was time to dig it out again. Whilst the NAS is excellent (DS Photo allows me to backup mine and my girlfriends photos from our phones, DS Video allows me to stream videos to my Chromecast, DS Audio streams all my music to my iPad and it can act as a VPN when I’m out and about, though this is less of a benefit now I have a years subscription to Private Internet Access), it doesn’t allow me to block adverts which is what Pi Hole does. Quite successfully.

Setup was easy and I had the Pi Hole up and running within 30 minutes or less. Setup was as simple as downloading a fresh copy of Raspbian, installing that, remembering to enable SSH as the new versions of Raspbian have SSH turned off by default

For headless setup, SSH can be enabled by placing a file named 'ssh', without any extension, onto the boot partition of the SD card.

Once this was done, I updated the Pi and then downloaded the Pi Hole software using the command

curl -sSL https://install.pi-hole.net | bash

This installed everything I needed and set it up. All that I then had to do was to set my router to give the Pi a static IP address and change the DNS settings on my devices to point to the Pi.

Once I’d done that, I’ve been able to enjoy ad blocking across all my devices.

The Pi presents everything in a web interface, so you can keep an eye on the drive at any point of time.

Untitled

This shows the DNS requests that are being made and you can even drill down into what sites are trying to be accessed.

Untitled

This shows the top domain name requested by devices and the top advertisers being blocked. You can also see what devices are requesting the most domains by IP address.

The downside I have is that the DNS records on my router cannot be changed, so I’ve manually had to change the details on each web connection. This isn’t the end of the world and actually can prove handy where I might want to allow an advertiser to track me (such as if I’m using a cashback site). However, it does mean that devices like my work laptop, ones that I cannot change the DNS settings on (in this case, due to admin lockdown), will not benefit from the blocking whilst on my network.

However, overall, the Pi Hole was easy to setup and manages to block a lot of adverts - browsing on the iPad, it’s surprising how much cleaner various websites are. There have been a single instances where the website has appeared to be broken due to the blockage and this was solved by white-listing the site. Whilst this should stop the need for running an adblocker in my browser, I’ve still got uBlock installed.

It’s certainly worth a try.