[root@rhce-ryanrudolf]# rm -rf / 2> /dev/null

things I break/fix for fun and learning

Apr 19, 2018 - 2 minute read - Comments - linux

Adblocking at the DNS Level

I have 2 wonderful kids who are at the age of curiosity and exploration with access to Internet using their own tablets (for school reading / games / research) and soon with a laptop / desktop. I need to protect them from the darkside of the Internet – gambling, fake news, porn, malware, inappropriate advertisements, etc etc.

One solution is to use adblocker on each endpoint device that connects to the Internet. This is OK, but has several downsides. Mainly this needs admin rights for it to work properly (root access on tablets / phones which I don’t have). Another downside is you have to configure this on each endpoint device, which can be overwhelming and time consuming.

Another solution is to block ads at the router level. My router which is flashed with OpenWRT supports this, but does not work all the time. Once the router reboots, you have to manually enable the function again for it to work again. I’ve tried troubleshooting this but unsuccessful.

Another solution that works really good for me is to block ads at the DNS level. This is more of a DIY that’s why I really like it well! And it also covers one of the objectives of the RHCE exam - creating / configuring DNS server.

With adblocking at the DNS level, I only need to configure and update one device on a weekly basis - my own DNS server. I load it up with all the known “zones” that are classified as ads, gambling, fake news, porn etc etc and it takes care of the rest of the endpoint devices. (Another device I need to configure once is the router - the router will provide the IP address to the endpoint devices and it will tell them to use my own DNS server).

And thats what I use regarding adblocking. I will make a writeup soon so that I have the guidelines in case I need to redo it again. After all I am doing this on my homelab. Homelab is for learning - break it, improve it and do it again!





Like this page? Share it!