Home Network Adblocker With PiHole and a Raspberry Pi

One of the problems I have with my youngster’s Android devices is the games they install on them usually have a ton of adware in there. I also wanted a way to block internet trackers on all the devices on my home network.

One way to do that would be to go to every individual phone, tablet or laptop and configure the browsers on them to block trackers. Another way would be to use an online DNS server like AdGuard which provides an Advertisement Blocking DNS service. The advantage of having a local DNS service in your home is to speed up DNS lookups.

But what is a DNS?

Before we go forward, do you know what a DNS lookup is? Every website has a website URL like – vinuthomas.com. But the network of computers on the internet don’t know how to reach the site. First, your domain has to be translated into a machine-understandable internet address ( IP address) like 104.24.109.16. This is done by asking a DNS (Domain Name Server) server to look up the IP address for the domain and give it to your browser. Then your browser proceeds to connect to that IP address to communicate with that site.

Faster lookups to speed your internet + a bonus

What if instead of asking a DNS server somewhere in your internet provider’s network or the internet, you could ask a something on your home network to look it up? It would reply much faster speeding up your internet connection. Also if this DNS server could somehow block advertisement and tracking servers from ever connecting?

Photo by Vishnu Mohanan on Unsplash

That’s exactly what I got installed on my home network. I repurposed an old Raspberry Pi computer and installed a software called Pi-hole on it. I configured my WiFi router to redirect all DNS lookups to this device instead. Pi-Hole looks up a list of services online and gets the updated list of tracker and advertisement servers and effectively blocks your browser and app on your laptop and mobiles from connecting to those servers.

~11% of the DNS requests from my home network seem to go to trackers and Ad Servers

Install in Two Easy Steps

Before you start, you’ll need to check on your Wifi access point or router on how to set a static IP address for your Raspberry Pi on your home network. Check your access point’s manual to see how to do this.

Step 1: Installing Pi-Hole on a Raspberry Pi is a two-step process which needs one command typed out in the PI’s terminal. This takes you through the package download and setup.

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

Before you proceed, take note of the admin password, which is set after the installation is complete; you’ll need this to access the web-based admin screens.

Step 2: Once this step is complete, all you need to do is to change the DNS server on your WiFi router to point to the Raspberry Pi’s IP Address.

Set your router’s DNS address.

Once you’ve installed it you can access your admin interface by hitting up the IP address in your browser. In my case, since my pi’s address is 192.168.1.62, I hit the URL http://192.168.1.62/admin in my browser to get the admin interface. Use the admin password from the setup in step 1 to log in.

Share this article
Prev Post

Electric Vehicles – Are they the cleaner alternate?

Next Post

Biometric Authentication – The future of security or not?

Leave a Reply

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

Read next
Mastodon