Skip to content

Instantly share code, notes, and snippets.

@k0nsl
Created February 22, 2016 11:24
Show Gist options
  • Save k0nsl/24df25f24f42a66aeceb to your computer and use it in GitHub Desktop.
Save k0nsl/24df25f24f42a66aeceb to your computer and use it in GitHub Desktop.
#!/bin/sh
touch /usr/local/etc/unbound/conf/malwaredomains.conf
mv /usr/local/etc/unbound/conf/malwaredomains.conf /dev/null
curl -o /root/malwaredomains.txt https://mirror.cedia.org.ec/malwaredomains/justdomains
cat /root/malwaredomains.txt | while read DOMAINS
do
echo local-zone: \"${DOMAINS}.\" static
echo local-data: \"${DOMAINS}. IN A 127.0.0.1\"
done > /usr/local/etc/unbound/conf/malwaredomains.conf
#the below is just a ugly way to remove useless entry on line #1 and #2
sed -i '1d' /usr/local/etc/unbound/conf/malwaredomains.conf
sed -i '1d' /usr/local/etc/unbound/conf/malwaredomains.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment