QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2216|回复: 0

关于Linux 的反向解析问题,困扰我好久了!!!!

[复制链接]
发表于 2006-12-25 10:51:13 | 显示全部楼层 |阅读模式
--------------------------------------------------------------------------------

正向解析一切正常,反向解析总是提示失败!

主配置文件:
[root@xaxj ~]# vi /etc/named.conf


options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "xaxj.com" IN {
type master;
file "xaxj.com.db";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "com.xaxj.db";
allow-update { none; };
};
include "/etc/rndc.key";

正解文件:


[root@xaxj named]# vi xaxj.com.db
$TTL 86400
$ORIGIN xaxj.com.
@ IN SOA dns.xaxj.com. root.dns.xaxj.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ IN NS dns.xaxj.com.
dns IN A 192.168.1.254

反解文件:


[root@xaxj named]# vi com.xaxj.db
$TTL 86400
$ORIGIN xaxj.com.
@ IN SOA dns.xaxj.com. root.dns.xaxj.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS dns.xaxj.com.

254 IN PTR dns.xaxj.com.

测试结果:


[root@xaxj named]# nslookup
> dns.xaxj.com
Server: 192.168.1.254
Address: 192.168.1.254#53

Name: dns.xaxj.com
Address: 192.168.1.254
> 192.168.1.254
Server: 192.168.1.254
Address: 192.168.1.254#53

** server can't find 254.1.168.192.in-addr.arpa: SERVFAIL

日志记录:
[root@xaxj named]# tail -10 /var/log/messages
Dec 25 10:59:53 XAXJ named[3032]: listening on IPv4 interface eth0, 192.168.1.254#53
Dec 25 10:59:53 XAXJ named[3032]: command channel listening on 127.0.0.1#953
Dec 25 10:59:53 XAXJ named[3032]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Dec 25 10:59:53 XAXJ named[3032]: dns_master_load: com.xaxj.db:9: xaxj.com: not at top of zone
Dec 25 10:59:53 XAXJ named[3032]: zone 1.168.192.in-addr.arpa/IN: loading master file com.xaxj.db: not at top of zone
Dec 25 10:59:53 XAXJ named[3032]: zone xaxj.com/IN: loaded serial 42
Dec 25 10:59:53 XAXJ named[3032]: zone localhost/IN: loaded serial 42
Dec 25 10:59:53 XAXJ named[3032]: running
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 04:41 , Processed in 0.035843 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表