For any one interested in this, as in, locally blocking ad/marlware etc using DNS:
-
I said my system choked up and couldn’t handle large hosts files but I used a program called tblock. Maybe your latest computer can totally handle it. I will bet on it.
-
If you are going the blocking by
hosts
route, remember thehosts
file will point the browser to0.0.0.0
or127.0.0.1
. In some cases there will be a wait/delay when loading while the browsing waits to see if it gets a reply from127.0.0.1
. In order to quicky end the request you need to use an app like pixelserv-tls. -
Something that worked on my computer is using
rpz
files. You use, a DNS resolver,knot-resolver
and point it to anrpz
file that contains the urls you want to block. -
Read this blog on how to do it. If you install from
AUR
the systemd service files are already there, you just need to edit them. Also read my comment. -
You can get
rpz
files from people who provide “ad/malware block lists”. Energized is a good example. Look for therpz
heading in the table. -
Performance with
knot-resolver
while blocking ads with anrpz
file is pretty good. I try and query a blocked url in the file (drill <url>
) which is 20 MB and it takes about a 1ms to get a response which is pretty good.