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