|
操作平台:Fedora 8 i386
/var/named/chroot/etc/named.conf 文件内容为:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
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;};
#};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "chn.com" IN {
type master;
file "chn.com";
allow-update {none;};
};
zone "4.168.192.in-addr.arpa" IN {
type master;
file "4.168.192.arpa";
allow-update {none;};
};
include "/etc/named.rfc1912.zones";
/var/named/chroot/var/name/chn.com 内容为:
$TTL 3h
chn.com. IN SOA dns.chn.com. root.dns.chn.com. (
1;
3h;
1h;
1w;
1h);
chn.com. IN NS dns.chn.com.
dns.chn.com. IN A 192.168.4.22
www.chn.com. IN A 192.168.4.251
chn.chn.com. IN A CNAME www.chn.com.
/var/named/chroot/var/name/4.168.192.arpa 文件内容为:
$TTL 3h
4.168.192.in-addr.arpa. IN SOA dns.chn.com. root.dns.chn.com. (
1;
3h;
1h;
1w;
1h);
4.168.192.in-addr.arpa IN NS dns.chn.com.
22.4.168.192.in-addr.arpa IN PTR dns.chn.com.
251.4.168.192.in-addr.arpa IN PTR www.chn.com.
/etc/init.d/named start 时出错:
[root@localhost named]# /etc/init.d/named start
启动 named:
Error in named configuration:
zone chn.com/IN: loaded serial 1
zone 4.168.192.in-addr.arpa/IN: has no NS records
_default/4.168.192.in-addr.arpa/IN: bad zone
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.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.arp a/IN: NS '1.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.ip 6.arpa' has no address records (A or AAAA)
zone 1.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.arp a/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address r ecords (A or AAAA)
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAA A)
zone 0.in-addr.arpa/IN: loaded serial 0
[失败]
看了好多书,说的都是这么简单,一操作就不对了,究竟是怎么回事呀,人都快疯掉了。
请懂得DNS配置的朋友给个解释,感激不尽。 |
|