modif mkzone
This commit is contained in:
parent
9dbde4a623
commit
00da92bdf9
@ -6,12 +6,13 @@ set -e
|
||||
# - ficher de zone inverse
|
||||
#
|
||||
readonly zone="domaine.lan"
|
||||
readonly zonerev="1.168.192.in-addr.arpa"
|
||||
readonly nsname="ns"
|
||||
readonly nsip="192.168.1.10"
|
||||
readonly zonenet="192.168.56"
|
||||
readonly zonerev="56.168.192.in-addr.arpa"
|
||||
readonly nsname="srv1"
|
||||
readonly nsip="${zonenet}.10"
|
||||
readonly nsiprev=$(echo ${nsip}|cut -d. -f4) # dernier octet pour classe C
|
||||
readonly nsname2="ns2"
|
||||
readonly nsip2="192.168.1.11"
|
||||
readonly nsname2="srv2"
|
||||
readonly nsip2="${zonenet}.11"
|
||||
readonly nsiprev2=$(echo ${nsip2}|cut -d. -f4)
|
||||
readonly ttl="86400"
|
||||
|
||||
@ -23,8 +24,8 @@ readonly date=$(date +%Y%m%d00)
|
||||
|
||||
cat <<EOT > "named.conf.local"
|
||||
|
||||
; fichier zone ${zone}
|
||||
; le $(date)
|
||||
# fichier zone ${zone}
|
||||
# le $(date)
|
||||
|
||||
zone "${zone}" {
|
||||
type master;
|
||||
@ -52,11 +53,11 @@ cat <<EOT > "db.${zone}"
|
||||
3600 ; minimum (1 hour)
|
||||
)
|
||||
|
||||
IN NS ${nsname}
|
||||
IN NS ${nsname2}
|
||||
@ IN NS ${nsname}
|
||||
@ IN NS ${nsname2}
|
||||
|
||||
IN A 203.0.113.10 # zone
|
||||
IN AAAA 2001:DB8:BEEF:113::10 #
|
||||
IN A 203.0.113.10 ; zone
|
||||
IN AAAA 2001:DB8:BEEF:113::10 ;
|
||||
www IN CNAME ${nsfqdnp}
|
||||
ftp IN CNAME ${nsfqdnp}
|
||||
|
||||
@ -71,7 +72,7 @@ cat <<EOT > "db.${zone}.rev"
|
||||
; fichier zone inverse ${zone}
|
||||
; le $(date)
|
||||
\$TTL ${ttl} ; (1 day)
|
||||
\$ORIGIN ${zonep}
|
||||
#\$ORIGIN ${zonep}
|
||||
@ IN SOA ${nsfqdnp} root.${nsfqdnp} (
|
||||
${date} ; serial YYYYMMDDnn
|
||||
14400 ; refresh (4 hours)
|
||||
@ -80,10 +81,9 @@ cat <<EOT > "db.${zone}.rev"
|
||||
3600 ; minimum (1 hour)
|
||||
)
|
||||
|
||||
IN NS ${nsname}
|
||||
IN NS ${nsname2}
|
||||
@ IN NS ${nsname}
|
||||
@ IN NS ${nsname2}
|
||||
|
||||
10 IN PTR
|
||||
|
||||
${nsiprev} IN PTR ${nsname}
|
||||
${nsiprev2} IN PTR ${nsname2}
|
||||
|
Loading…
x
Reference in New Issue
Block a user