Network Wide Ad Blocking with Pi-Hole

What is Pi-Hole?

Pi-Hole is a software suite that installs a network-wide ad blocking service on a Raspberry Pi device. This software is great because it blocks ads from any device on your network if configured correctly, and you could even set up a VPN to give you ad blocking service anywhere.

Installing the Pi-Hole

Log in to your raspberry pi via SSH. Make sure you can access it via SSH, if not then please do some research and get your Raspberry Pi setup properly.

Run the Pi Hole Installer

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

It will take some time to install. Be patient. 

Configuring Pi-Hole

Pick the upstream DNS provider: Google is a solid option.

Pick IPv4. If you needed to use IPv6, you would know.

The installer will grab IP information via DHCP and offer to set the IP assignment as static. Use the IP information provided or change it to another available IP on your network.

The administrative web interface looks great and makes it easier to manage the Pi-Hole services. I would install this if you’re not prepared to interface with Pi-Hole via command line.

When the configuration is complete, you’ll get a final config screen showing you the IP information for you Pi-Hole as well as the admin password. Copy this information or write it down somewhere.

Admin Page

Visit the admin page via http://IP (replace IP with IP you set for Pi-Hole)

Below is a screenshot from my administrative interface. I’ve been running this for around 1-2 months so far. When you login, you wont see all the pretty visuals until you start actually making DNS requests by browsing and using the internet.

Forwarding DNS Requests at the Router

You can set your raspberry PI as the DHCP server and then all new clients that connect will automatically be connected to the Pi-Hole DNS server, or you could set the DNS server of the router as the Pi-Hole and keep DHCP on the router. If you do the latter, all traffic on the Pi-Hole analytics will come from a single host (router) since your router is still the DNS server on the network and it’s forwarding it to a secondary DNS- the Pi-Hole.

Leave a Reply

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