If you’ve used the internet before… I’m sure you are sick of all the invasive advertising which is creeping it’s way onto most websites these days. But not just that, all the tracking! You know what i’m talking about. You’re talking to your mate Steve about buying the new tyre-ripper3000 on facebook messenger and the next minute you start seeing adverts for the same bloody thing!
You can install a browser adblocker but they aren’t the best solution. There are better options such as whole network level ad blocking on your Laptop, PC, Phone, Tablet. Anything. All without the need to install various clients on each device and it’s free too.
Enter Pihole, whole home adblocking on all your devices! sounds good right? ok lets get it going.
Hopefully you’ve already got a ubuntu virtual machine running thanks to my last guide however Pihole can be run on many devices. It’s a very lightweight program designed to be run on a RasberryPi i’m sure we all have one of those laying around, i know i do.
So once you’ve installed your favourite flavour of Linux on your device of choice you’re going to want to run the install for Pihole.
sudo curl -sSL https://install.pi-hole.net | bash
As we are elevating with Sudo you will need your password
This will automatically download Pihole and get it installing for you.
1. The first step is Pihole will ask what DNS service you want to use. Google 220.127.116.11 is a good choice although there are others.
2. You can choose to block ads over IPV4 or 6, most users will only need 4, but choose both if you might use IPV6 one day, what the hell.
3. Pihole will ask if the current IP address of that machine is what you want to use. Hopefully you’ve already set a static IP address.
4. You WILL need the web admin interface so choose ON for this.
5. You can choose to log queries, it will help trying to find sites which you might not want to be blocked in future.
7. The installation will finish and give you your confirmation screen including your webadmin password. Its up to you if you leave this as it is. If you do, make a note. However you can change the password which ill show next.
8. You should be able to access your pihole server from http://yourIP/admin
9. To change your password from the command line type:
sudo pihole -a -p
You will need your sudo password.
At this point the PIhole will ask you to enter a new password twice. Once you’ve done that it will give the confirmation that it’s changed.
Once you’ve logged in you will see your dashboard. This shows all the queries it’s received, how many queries were blocked and how many domains are on the blocklists.
My server below has been running around 5 days with 120~ clients and it’s doing a very good job at blocking most ads (some will still get through such as facebook ads which are delivered from the same URL)
From this dashboard you can monitor what is happening and the software plots all the information out into these eyecandy graphs. It’s a very nice bit of software.
But wait, theres more.
There is one VITAL step to go to make the whole thing work on your network.
As the Pihole blocks adverts on the network level we need to integrate it into YOUR network.
This works by setting your DNS IP address to your pihole device.
11. You will need to access your web admin control panel for your router these are different in everybody’s homes so i can’t offer information for everybody however ill offer up a general guide.
Your router will be the gateway in your IP settings. Usually 192.168.0.254 or 192.168.0.1
Once you’ve loaded up your control panel you need to find your Local network settings.
In here there will be DNS settings. Either set to your ISP’s DNS server or Google (18.104.22.168)
Change this to the IP address of your PIhole Server and click save. Most routers need to reboot at this point.
Once it’s restarted try visiting a site with known adverts, Pihole offer a few suggestions here for testing. Because you’ve changed your routers DNS settings it should now be applied to all your devices round your home.
If you find that something is being blocked that it shouldn’t. Or if you want to support a certain website by letting adverts load you can add the URL of that website into the WHITELIST on the admin page.
Likewise if something is showing adverts which shouldn’t. You can add this URL to the BLACKLIST.
Enjoy your adfree surfing.