DNS主从服务器的搭建:
- options {
- directory "/var/named";
- };
- zone "." IN {
- type hint;
- file "named.ca";
- };
- zone "localhost" IN {
- type master;
- file "localhost.zone";
- allow-transfer { none; };
- };
- zone "0.0.127.in-addr-arpa" IN {
- type master;
- file "127.0.0.zone";
- allow-transfer { none; };
- };
- zone "insprion.com" IN {
- type master;
- file "insprion.com.zone";
- allow-transfer { 172.16.60.1; };
- };
- zone "60.16.172.in-addr.arpa" IN {
- type master;
- file "172.16.60.zone";
- allow-transfer { none; };
- };
- $TTL 86400
- @ IN SOA ns.insprion.com. admin.insprion.com. (
- 2012102101
- 12H
- 1H
- 30D
- 1D )
- @ IN NS ns
- IN NS ns2
- IN MX 10 mail
- ns IN A 172.16.60.1
- ns2 IN A 172.16.60.7
- www IN A 172.16.60.1
- ftp IN CNAME www
- pop3 IN A 172.16.60.3
- mail IN A 172.16.60.7
- $TTL 86400
- @ IN SOA ns.insprion.com. admin.insprion.com. (
- 2012102101
- 12H
- 1H
- 30D
- 1D )
- IN NS ns.insprion.com.
- IN NS ns2.insprion.com.
- 1 IN PTR ns.insprion.com.
- IN PTR www.insprion.com.
- 3 IN PTR pop3.insprion.com.
- zone "ZONE" IN {
- type slave;
- file "slaves/ZONE_FILE";
- masters { MASTER_SERVER; };
- allow-transfer {};
- };
- Generating public/private rsa key pair.
- Enter file in which to save the key (/root/.ssh/id_rsa):
- Created directory '/root/.ssh'.
- Your identification has been saved in /root/.ssh/id_rsa.
- Your public key has been saved in /root/.ssh/id_rsa.pub.
- The key fingerprint is:
- ce:cf:b1:38:be:ff:2b:71:05:a4:67:af:0f:32:67:2d [email protected]
- vim /etc/named.conf
- options {
- directory "/var/named";
- };
- zone "." IN {
- type hint;
- file "named.ca";
- };
- zone "localhost" IN {
- type master;
- file "localhost.zone";
- allow-transfer { none; };
- };
- zone "0.0.127.in-addr-arpa" IN {
- type master;
- file "127.0.0.zone";
- allow-transfer { none; };
- };
- zone "insprion.com" IN {
- type slave;
- file "insprion.com.zone";
- masters { 172.16.60.1; };
- };
- //zone "60.16.172.in-addr.arpa" IN {
- // type master;
- // file "172.16.60.zone";
- //};