#!/bin/sh TMPFILE=$( mktemp get_dns_blacklists-XXXXXXXXX ) trap 'rm -f $TMPFILE; exit 1' EXIT KILL INT QUIT TERM ( curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | grep ^0.0.0.0 | awk '{ print $2 }' curl -s http://mirror1.malwaredomains.com/files/justdomains curl -s http://sysctl.org/cameleon/hosts | grep ^127.0.0.1 | awk '{ print $2 }' curl -s https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist curl -s https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt curl -s https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt curl -s https://hosts-file.net/ad_servers.txt | grep ^127.0.0.1 | awk '{ print $2 }' curl -s https://raw.githubusercontent.com/quidsup/notrack/master/trackers.txt | awk '{ print $1 }' ) | tr -d "\r" | tr 'A-Z' 'a-z' | sed -e 's/\.$//' | grep -v -e '^#' | grep '\.' | sort -u | while read domain; do echo local-zone: \"$domain\" redirect echo local-data: \"$domain. A 0.0.0.0\" done > $TMPFILE mv $TMPFILE /etc/unbound/unbound.conf.d/ad-blacklist.conf /etc/init.d/unbound restart