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
hostsroute, remember thehostsfile will point the browser to0.0.0.0or127.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
rpzfiles. You use, a DNS resolver,knot-resolverand point it to anrpzfile that contains the urls you want to block. -
Read this blog on how to do it. If you install from
AURthe systemd service files are already there, you just need to edit them. Also read my comment. -
You can get
rpzfiles from people who provide “ad/malware block lists”. Energized is a good example. Look for therpzheading in the table. -
Performance with
knot-resolverwhile blocking ads with anrpzfile 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.