Skip to content

Instantly share code, notes, and snippets.

@ryandrake08
Created January 21, 2018 00:39
Show Gist options
  • Save ryandrake08/bd2616eacbf2565243ffee74f89b9c5d to your computer and use it in GitHub Desktop.
Save ryandrake08/bd2616eacbf2565243ffee74f89b9c5d to your computer and use it in GitHub Desktop.
dnsmasq-based adblock configuration on RT-N66U running Asuswrt-Merlin
address=/0.0.0.0/0.0.0.0
addn-hosts=/jffs/dns_blocklist
#!/bin/sh
sleep 12
/jffs/scripts/update-blocklist
#!/bin/sh
cru a UpdateBlocklist "00 00 * * 5 /jffs/scripts/update-blocklist"
#!/bin/sh
wget -qO- "http://winhelp2002.mvps.org/hosts.txt" "http://someonewhocares.org/hosts/zero/hosts" "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > /jffs/dns_blocklist
sleep 5
service restart_dnsmasq
@ryandrake08
Copy link
Author

dnsmasq.conf.add in /jffs/configs, other files in /jffs/scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment