Als Script
#!/bin/bash ###############################################################################$ # ###############################################################################$ cd /Verzeichnis /usr/bin/wget -N https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts /usr/bin/wget -N https://download.dnscrypt.info/blacklists/domains/mybase.txt /usr/bin/wget -N https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/whitelist.txt cat hosts | grep '^0\.0\.0\.0' | awk '{print $2}' > block sed '/#/d; /*/d; /^$/d; /^\./d' mybase.txt > mybase cat block mybase | sort -u > merged touch /root/blocklist/mywhitelist cat whitelist.txt /root/blocklist/mywhitelist | sort -u > whitelist comm -23 merged whitelist > merged_corr awk '{print "local-zone: \""$1"\" refuse"}' merged_corr > /etc/unbound/unbound.conf.d/blocklist.conf sed -i '1s/.*$/server:\n&/g' /etc/unbound/unbound.conf.d/blocklist.conf service unbound restart