Raspberry Pi: Turn the popular single-board computer into an ad blocker
While adverts are not necessarily a bad thing, you may want some control over what content you are shown. Ad blockers are two a penny these days, with some web browsers like Opera even including built-in ones. But what if you would like greater oversight on the ads and trackers that are following your travels through the internet?
Well, if you have a spare Raspberry Pi lying about, then you could put it to use as a Pi-hole client. Pi-hole has been around for a while now, with the Raspberry Pi Blog running a post on it in 2018. All the same, it is a great way to block, and keep track of, traffic on your network.
All you need is a Raspberry Pi and the ability to run a script, the details of which you can find on places like the Raspberry Pi Blog or in a recent Devscover Coding & Raspberry Pi video. In essence, Pi-hole does not block ads in as much as it sends no data to certain domains. So, you will still see the boxes where adverts would normally be, but they should no longer display. Equally, Pi-hole hamstrings trackers, too. Setting-up Pi-hole takes about ten minutes and can be done from your Raspberry Pi itself.
You must also configure your devices to use your Raspberry Pi's IP address as their default DNS name server. While this is borderline impossible on Android 10, setting your router's DNS name server to your Raspberry Pi's IP address seems to resolve any device-specific restrictions.
There are limits to Pi-hole, though. Sadly, it cannot control YouTube video adverts, primarily because of Google's obfuscation with the domains it uses to serve them before the start of videos. However, Pi-hole serves more than just to block ads. There is also a handy Pi-hole web interface that allows you to monitor ad-blocking data, query logs and a host of other information. Pi-hole is free to use, although the developers ask for a donation the software useful.