条件
1 ip段或者ip的反向解析的授权,即是由isp向上层直到APNIC提供申请
2 dns服务器至少2台
3 反向域名记录PTR的sn号必须一样
4 该域名最好是在以上2台服务器上做的解析
5 该域名的正向记录必须可以正常解析
例如:对于221.236.5段部分ip
a: vi /etc/named.conf
zone "5.236.221.in-addr.arpa" {
type master;
file "/var/named/data/221.236.5.rev";
};
b:
b1: cat /var/named/chroot/var/named/data/tfol.com.hosts
ws01.tfol.com. IN A 221.236.5.15
ws02.tfol.com. IN A 221.236.5.16
ws03.tfol.com. IN A 221.236.5.17
ws04.tfol.com. IN A 221.236.5.18
b2: cat /var/named/chroot/var/named/data/scsmb.cn.hosts
mail.scsmb.cn. IN A 221.236.5.11
pop.scsmb.cn. IN A 221.236.5.12
smtp.scsmb.cn. IN A 221.236.5.13
c: cat /var/named/chroot/var/named/data/221.236.5.rev
$ttl 38400
5.236.221.in-addr.arpa. IN SOA ns.westidc.com.cn. root.mail.tfol.com. (
5
10800
3600
604800
38400 )
5.236.221.in-addr.arpa. IN NS ns.westidc.com.cn.
5.236.221.in-addr.arpa. IN NS ns.westidc.net.cn.
5.236.221.in-addr.arpa. IN PTR westidc.com.cn.
5.236.221.in-addr.arpa. IN PTR westidc.net.cn.
11.5.236.221.in-addr.arpa. IN PTR mail.scsmb.cn.
12.5.236.221.in-addr.arpa. IN PTR pop.scsmb.cn.
13.5.236.221.in-addr.arpa. IN PTR smtp.scsmb.cn.
15.5.236.221.in-addr.arpa. IN PTR ws01.tfol.com.
16.5.236.221.in-addr.arpa. IN PTR ws02.tfol.com.
17.5.236.221.in-addr.arpa. IN PTR ws03.tfol.com.
18.5.236.221.in-addr.arpa. IN PTR ws04.tfol.com.
19.5.236.221.in-addr.arpa. IN PTR ws05.tfol.com.
重新启动dns服务后,测试:
C:\>nslookup
Default Server: ns.westidc.com.cn
Address: 221.236.9.9
> ws01.tfol.com.
Server: ns.westidc.com.cn
Address: 221.236.9.9
Name: ws01.tfol.com
Address: 221.236.5.15
> ws02.tfol.com
Server: ns.westidc.com.cn
Address: 221.236.9.9
Name: ws02.tfol.com
Address: 221.236.5.16
> mail.scsmb.cn.
Server: ns.westidc.com.cn
Address: 221.236.9.9
Name: mail.scsmb.cn
Address: 221.236.5.11
> smtp.scsmb.cn.
Server: ns.westidc.com.cn
Address: 221.236.9.9
Name: smtp.scsmb.cn
Address: 221.236.5.13
> set type=ptr
> 221.236.5.13
Server: ns.westidc.com.cn
Address: 221.236.9.9
13.5.236.221.in-addr.arpa name = smtp.scsmb.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.com.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.net.cn
ns.westidc.com.cn internet address = 221.236.9.9
ns.westidc.net.cn internet address = 210.77.146.30
> 221.236.5.15
Server: ns.westidc.com.cn
Address: 221.236.9.9
15.5.236.221.in-addr.arpa name = ws01.tfol.com
5.236.221.in-addr.arpa nameserver = ns.westidc.net.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.com.cn
ns.westidc.com.cn internet address = 221.236.9.9
ns.westidc.net.cn internet address = 210.77.146.30
> 15.5.236.221.in-addr.arpa
Server: ns.westidc.com.cn
Address: 221.236.9.9
15.5.236.221.in-addr.arpa name = ws01.tfol.com
5.236.221.in-addr.arpa nameserver = ns.westidc.net.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.com.cn
ns.westidc.com.cn internet address = 221.236.9.9
ns.westidc.net.cn internet address = 210.77.146.30
> 13.5.236.221.in-addr.arpa
Server: ns.westidc.com.cn
Address: 221.236.9.9
13.5.236.221.in-addr.arpa name = smtp.scsmb.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.net.cn
5.236.221.in-addr.arpa nameserver = ns.westidc.com.cn
ns.westidc.com.cn internet address = 221.236.9.9
ns.westidc.net.cn internet address = 210.77.146.30
阅读(3484) | 评论(1) | 转发(0) |