Detailed description View:
(a) Play with Me Linux network services: DNS service--bind (/etc/named.conf,/var/named) settings implementation and interpretation
1#! /bin/Bash2ip="10.10.10"3rip="10.10.10"4dn="gr.org"5Name="10.10.10.10"6 7Cat >>/etc/named.conf << +end+8Zone"$DN."In {9 type master;TenFile"gr.org.db"; One }; AZone"$RIP. In-addr.arpa"in{ - type master; -File"$IP. DB"; the }; -+end+ -Cat >/var/named/$DN. DB <<+end+ -\ $TTL86400 + @ in SOA ns. $DN. Root. $DN. ( - 201503176H 30M 1W 15M) + In NS NS. $DN. AIn MXTenMail. $DN. at bbs in CNAME www. $DN. -NS in A $IP.Ten -www in A $IP.Ten -Mail in A $IP. One -+end+ -Cat >/var/named/$IP. DB <<+end+ in\ $TTL86400 - @ in SOA ns. $DN. Root. $DN. ( to 201503176H 30M 1W 15M) + In NS NS. $DN. - TenIn PTR ns. $DN. the TenIn PTR www. $DN. * OneIn PTR Mail. $DN. $+end+Panax NotoginsengCat >/etc/resolv.conf <<+end+ - nameserver $Name the+end+ + AService named start
Shell script--dns Automatic deployment