Created
November 7, 2017 10:28
-
-
Save alexalouit/3a0997e2968907f60d37b60d3bc31441 to your computer and use it in GitHub Desktop.
Dnsmasq based ads blacklist (use @StevenBlack/hosts)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cron ex: @daily /root/scripts/adblock.sh >> /dev/null | |
# be sure dnsmasq load /etc/dnsmasq.d/*.conf | |
wget -O- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '$1 == "0.0.0.0" { print "address=/"$2"/0.0.0.0/"}' > /etc/dnsmasq.d/ad_hosts.conf | |
#/etc/init.d/dnsmasq restart | |
systemctl restart dnsmasq.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment