Press "Enter" to skip to content

How I blocked most ads on all devices connected to my network

Even though I already suffer from complete ad-blindness, sometimes they still annoy me, especially when it comes to mobile apps when a whole screen filled with ads just pops up randomly. Not to mention those sneaky pop-ups/pop-unders in your browser. I’ve tried different ad blockers, both on Windows/Ubuntu and Android, but wasn’t very happy with them.

I own a pretty rusty modem, which I am not willing to replace, as I already got holes drilled in my wall, so I could hang it. Fortunately my TL-WR741ND v1 is still able to run DD-WRT or OpenWrt.

So the first step was to replace the original firmware with OpenWRT. OpenWRT is a Linux distribution optimized in size to be run on embedded devices, such as my ancient router. It’s just amazing what it turns your router into. You are able to connect to your router using SSH, install packages, configure iptables and a lot more. However, I could not really enjoy all the possibilities offered by the new software, since my router is very limited when it comes to hardware.

Connected to my router through SSH

But my old rusty box is not dead yet, it is still able to pull the good old hosts file trick to block ad servers. You may find several lists of ad servers on the Internet, I’ve got the one from winhelp2002, since they already use the 0.0.0.0 address instead of 127.0.0.1, which seems o make websites load a lot faster. A simple wget command is enough to bring the list to the /etc/hosts file and after a router restart most of the advertisements are gone from your devices, including ads in Android apps and in YouTube videos.

Be First to Comment

Leave a Reply

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