Wednesday 10 July 2024

Pi-Hole; network ad blocker

Adverts can bog you down.


They slow down the loading of web pages, especially on modest machines.

So its high time I setup a network ad-blocker!

Although I've got AdBlock on my main laptop browser, it can be more difficult to shield other devices like TVs and sometimes even phones.

Using a RaspberryPi to host an Ad blocker is not new, its just taken me a long time to get around to implementing one.

So I searched through my old box of Raspberry Pi computers and eventually settled on a Pi 3B with a minor fault: there is no 5Volts on the USB ports! 

Don't know why, but as this will be running Pi-Hole software as a headless server probs!

the Pi-Hole dashboard web page

The basic principle is that the system is connected to your home network and your modem is configured to use the Pi IP address as its DNS address. All external IP addresses that are requested are checked against the system Ad lists and all requests from your devices (e.g. computers, phones & so on) are either blocked or allowed.

As you will see from the screenshot above, my system was initially configured with over 207,000 addresses in the Ad list. (Currently its almost a quarter of a million).

There are lots of good guides on the net (both video & written) so I won't repeat the installation process here.

See the World's Greatest Pi-Hole Tutorial:-

Its also worth looking at their blog post

I'm also using unbound which according to their Github description:-

 "Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards."

In use, you should notice blank white blocks of space on web pages where any advertisements have been blocked. You can double check this by using Disable Blocking from the interface and refreshing web pages (maybe on other devices) to see the effect.

In addition, you may like to try this Adblock Tester

The adblocker will not remove adverts from video stream services (...but wouldn't it be great if there was such a thing?).

I have also added a few Adlists...

 ...which are available on the internet in a number of locations such as:

You can see from my Adlists above that I have disabled one of the lists. This is because I couldn't play video streams from UKTV Play. If time permits I will try to re-enable it and then add some entries to the Whitelist to see if I can fix it that way.

As far as the web interface information is concerned, I'm still trying to work out what it all means.

After a couple of days away, we came home to find some sort of internet access problem. Not sure what happened, but PiHole is still very much on probation!

See also:-

The official documentation

No comments:

Post a Comment