- 论坛徽章:
- 0
|
我的环境是Redhat enterprise as4,我的配置如下:
/etc/named.conf
//
// named.conf for Red Hat caching-nameserver
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
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 "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
zone "dmt.com" IN {
type master;
file " dmt.zone";
allow-update{ none; };
};
zone "146.155.58.in-addr.arpa" IN {
type master;
file " 146.155.58.zone";
allow-update { none; };
};
include "/etc/rndc.key";
这里是这么配置的:
/var/named/chroot/var/named/ 里的文件
[root@gxh named]# more dmt.zone
$TTL 86400
@ IN SOA dns.dmt.com root.dns.com. {
42
3H
15M
1W
1D )
dmt.com IN NS dns.dmt.com.
dns IN A 58.155.146.90
www IN A 58.155.146.90
[root@gxh named]# more 146.155.58.zone
$TTL 86400
@ IN SOA dns.dmt.com. root.dns.dmt.com. (
1997022700
28800
14400
3600000
86400 )
IN NS dns.dmt.com.
90 IN PTR dns.dmt.com.
90 IN PTR www.dmt.com.
[root@gxh named]#
大家看看我的配置有什么问题,怎么就无法解析呢
[root@gxh named]# host 58.155.146.90
Host 90.146.155.58.in-addr.arpa not found: 2(SERVFAIL)
[root@gxh named]# host www.dmt.com
Host www.dmt.com not found: 2(SERVFAIL)
[root@gxh named]#
请大家帮帮忙,是不是就配置这两个文件就可以啊?还需要做别的吗? |
|