← Back to post

Edit history

Most recent

My “script” to update the blocklist from time to time was literally

curl <blocklist1 link> > templist
curl <blocklist2 link> >> templist
grep ‘^0\.0\.0\.0’ templist | awk '{print “local-zone: \”“$2”\" always_refuse"} > blocklist.conf
systemctl restart unbound.service

and an include blocklist.conf at the bottom of unbound.conf (awk to convert it from the “0.0.0.0 <site>” format to “local-zone: <site> always_refuse”).

Edited

My “script” to update the blocklist from time to time was literally

curl *<blocklist1 link>* > templist
curl *<blocklist2 link>* >> templist
grep ‘^0\.0\.0\.0’ templist | awk '{print “local-zone: \”“$2”\" always_refuse"} > blocklist.conf
systemctl restart unbound.service

and an include blocklist.conf at the bottom of unbound.conf (awk to convert it from the “0.0.0.0 <site>” format to “local-zone: <site> always_refuse”).

Original

My “script” was literally

curl *<blocklist1 link>* > templist
curl *<blocklist2 link>* >> templist
grep ‘^0\.0\.0\.0’ templist | awk '{print “local-zone: \”“$2”\" always_refuse"} > blocklist.conf
systemctl restart unbound.service

and an include blocklist.conf at the bottom of unbound.conf (awk to convert it from the “0.0.0.0 <site>” format to “local-zone: <site> always_refuse”).