Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # aDNSblock by vincesafe
- # @vincesafe on Twitter // vincesafe.fr
- if [[ $EUID -ne 0 ]]; then
- echo "You have to be root to run this script" 1>&2
- exit 1
- fi
- if [ ! -f /etc/init.d/bind9 ]
- then
- echo "bind9 is required to use this script"
- exit 2
- fi
- echo "include \"adblock_include.conf\";" >> /etc/bind/named.conf.local
- wget http://spammerslapper.com/downloads/adblock_include.conf -O /var/cache/bind/adblock_include.conf
- echo "$TTL 86400 ;" > /var/cache/bind/null.zone.file
- echo "@ IN SOA server root.localhost. (2012110100; 28800; 7200; 864000; 86400 ) ;" >> /etc/bind/null.zone.file
- echo " NS server" >> /etc/bind/null.zone.file
- echo " A 127.0.0.1" >> /etc/bind/null.zone.file
- echo "* IN A 127.0.0.1" >> /etc/bind/null.zone.file
- echo "You may restart bind9 to apply changes"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement