Created
May 30, 2022 11:53
-
-
Save p3ngu1n-net/b953b1e5a1f1676dcc87ba5008b6bc5a to your computer and use it in GitHub Desktop.
Downloads & processes OISD Full Domain list for using in Unbound DNS resolver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
printf "Downloading OISD Full Domain list... " | |
curl "https://dbl.oisd.nl/" -o oisd-dbl.txt 2> /dev/null | |
printf "done\nProcessing list... " | |
grep -v "#" oisd-dbl.txt | grep "." | awk '{print "local-zone: \""$1"\" always_nxdomain"}' > oisd.conf | |
rm -f oisd-dbl.txt | |
printf "done\n" | |
printf "Moving list to unbound directory... \n" | |
rm /etc/unbound/oisd.conf | |
cp oisd.conf /etc/unbound/oisd.conf | |
printf "Restarting unbound... \n" | |
systemctl restart unbound |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment