Created
January 11, 2017 10:05
-
-
Save marcmillien/3c28eb93fc46fdd8d25537da927c824c to your computer and use it in GitHub Desktop.
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/bash | |
apt-get update | |
apt-get install bind9 | |
cat <<EOF > /etc/bind/named.conf.options | |
options { | |
directory "/var/cache/bind"; | |
forwarders { | |
8.8.8.8; | |
8.8.4.4; | |
208.67.220.220; | |
}; | |
auth-nxdomain no; # conform to RFC1035 | |
listen-on-v6 { none; }; | |
listen-on { 127.0.0.1; 10.9.8.1; 172.17.0.1; }; | |
}; | |
EOF | |
/etc/init.d/bind9 restart | |
echo 'nameserver 127.0.0.1' > /etc/resolv.conf | |
/etc/init.d/dns-clean restart | |
sed -i -e 's/#prepend domain-name-servers 127.0.0.1;/prepend domain-name-servers 127.0.0.1;/g' /etc/dhcp/dhclient.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment