44 lines
1.0 KiB
Bash
44 lines
1.0 KiB
Bash
#/bin/bash
|
|
|
|
cat > /etc/bind/named.conf.options <<EOL
|
|
options {
|
|
directory "/var/cache/bind";
|
|
|
|
forwarders {
|
|
192.168.122.1;
|
|
};
|
|
|
|
dnssec-validation no;
|
|
auth-nxdomain no;
|
|
allow-query { any; };
|
|
listen-on-v6 { any; };
|
|
};
|
|
EOL
|
|
|
|
cat > /etc/bind/named.conf.local <<EOL
|
|
zone "hogwarts.f01.com" {
|
|
type master;
|
|
file "/etc/bind/hogwarts/hogwarts.f01.com";
|
|
};
|
|
EOL
|
|
|
|
mkdir -p /etc/bind/hogwarts
|
|
|
|
cat > /etc/bind/hogwarts/hogwarts.f01.com <<EOL
|
|
\$TTL 604800
|
|
@ IN SOA ns1.hogwarts.f01.com. root.hogwarts.f01.com. (
|
|
2 ; Serial
|
|
604800 ; Refresh
|
|
86400 ; Retry
|
|
2419200 ; Expire
|
|
604800 ); Negative Cache TTL
|
|
|
|
@ IN NS ns1.hogwarts.f01.com.
|
|
|
|
ns1 IN A 10.67.3.3 ; IP address of DNS Master
|
|
|
|
gryffindor IN A 10.67.4.3 ; IP address of Voldemort LB
|
|
ravenclaw IN A 10.67.4.4 ; IP address of Dementor LB
|
|
EOL
|
|
|
|
service named restart |