first commit
This commit is contained in:
20
dns/adddomain
Normal file
20
dns/adddomain
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat > /etc/bind/named.conf.domains/$1.conf <<EOF
|
||||
zone "$1" {
|
||||
type master;
|
||||
file "/etc/bind/named.conf.domain/db.$1";
|
||||
};
|
||||
EOF
|
||||
|
||||
cat > /etc/bind/named.conf.domain/db.$1 <<EOF
|
||||
$TTL 604800
|
||||
@ IN SOA $1. root.$1. (
|
||||
2 ; Serial
|
||||
604800 ; Refresh
|
||||
86400 ; Retry
|
||||
2419200 ; Expire
|
||||
604800 ) ; Negative Cache TTL
|
||||
;
|
||||
@ IN A $2
|
||||
EOF
|
||||
2
dns/named.conf
Normal file
2
dns/named.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
include "/etc/bind/named.conf.options";
|
||||
include "/etc/bind/named.conf.domains/*.conf";
|
||||
10
dns/named.conf.options
Normal file
10
dns/named.conf.options
Normal file
@@ -0,0 +1,10 @@
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
forwarders {
|
||||
8.8.8.8;
|
||||
8.8.4.4;
|
||||
};
|
||||
dnssec-validation auto;
|
||||
auth-nxdomain no;
|
||||
listen-on-v6 { any; };
|
||||
};
|
||||
Reference in New Issue
Block a user