#!/bin/sh # Retrieves ad blacklist and adds them to unbound as NXDOMAIN ( # DisconTrack ftp -V -o - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt # DisconAd (problem: here.com) ftp -V -o - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt # notracking (https://github.com/notracking/hosts-blocklists) # issue: src.litix.io (molotov) service.videoplaza.tv (rtl.be) exacttarget.com (N26 mails) tags.tiqcdn.com (proximus) gmailnator.com adjust.com (molotov) ftp -V -o - https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt ftp -V -o - https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt ) | sed 's/ //g' | tr '[A-Z]' '[a-z]' | sort -u | egrep -v '#|^$|braze.com|4shared|adjust.com|segment\.|cloudfront.net|sendgrid.net|^here.com|litix.io|service.videoplaza.tv|tiqcdn.com|gmailnator.com' | sed -e 's|\(.*\)|local-zone: "\1" always_nxdomain|' > /var/unbound/etc/blacklist.conf rcctl restart unbound