News for hackers. Stuff that matters.
Re:Optimal DNS Ad Blocker by oliwarner on Friday July 29, 2016 @08:44PM (#12191075)
Urgh why do people have to be so POSIX about things. Here is the content of my /etc/cron.daily/adblock file:

    #!/bin/bash

    wget -qO- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts \
    | sort -u \
    | awk '/^0/ {print;print ":: " $2}' \
    > /tmp/ad-hosts

    service dnsmasq reload

I know cycles are cheap but that doesn't mean we should be spaffing them up the wall when we can do things cheaper. This avoids double-processing the downloaded content.

dnsmasq config as above.

Re:Optimal DNS Ad Blocker by neurostimulant on Saturday July 30, 2016 @03:36AM (#12192029)
How is the performance of dns lookup when using dnsmasq? Is it faster than putting them on /etc/hosts? I tried putting the blocked domains in the /etc/hosts file, but the performance is terrible. It significantly increased dns lookup time on my i5 laptop (that was before I upgraded my laptop with ssd though), so I ended up configuring my own ad blocking dns server on a cheap Scaleway vps instead and never have any issue with long dns lookup anymore.