#!/bin/sh # # Convert the Yoyo.org anti-ad server listing # into an unbound dns spoof redirection list. wget -q -O- --header\="Accept-Encoding: gzip" 'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext' | \ gunzip | \ awk '/^127\./{ print "local-zone: \"" $2 "\" redirect" print "local-data: \"" $2 " A 127.0.0.1\"" }' > /etc/unbound/unbound_antipub.conf # then add an include line to your unbound.conf pointing to the full path of # the unbound_ad_servers file: # # include: unbound_ad_servers #