我正在尝试在 RHEL 5 上配置 DNS 以用于学习目的。
我已经设置了正向区域、反向区域和named.conf
文件以使 DNS 正常工作,但是当我运行时service named start
,出现以下错误:
操作系统:RHEL 5
我使用的 IP 172.168.190.1 ... 172.168.190.50
我的/etc/named.conf
文件如下:
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
listen-on port 53 {any; };
};
zone "oracleexpert.com" IN {
type master;
file "oracleexpert.com.fwd.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.fwd.zone";
allow-update { none; };
};
zone "190.168.172.in-addr.arpa." IN {
type master;
file "172.168.190.rev.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "localhost.rev.zone";
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; };
};
include "/etc/rndc.key";
50,19 Bot
这是输出sed -n l /etc/named.conf
:
options {$
\tdirectory "/var/named";$
\tlisten-on port 53 { any; };$
};$
$
zone "oracleexpert.com" IN {$
\ttype master;$
\tfile "oracleexpert.com.fwd.zone";$
\tallow-update { none; };$
};$
$
zone "localhost" IN {$
\ttype master;$
\tfile "localhost.fwd.zone";$
\tallow-update { none; };$
};$
$
zone "190.168.172.in-addr.arpa" IN {$
\ttype master;$
\tfile "172.168.190.rev.zone";$
\tallow-update { none; };$
};$
$
zone "0.0.127.in-addr-arpa" IN {$
\ttype master;$
\tfile "localhost.rev.zone";$
\tallow-update { none; };$
};$
$
zone "255.in-addr.arpa" IN {$
\ttype master;$
\tfile "named.broadcast";$
\tallow-update { none; };$
};$
$
zone "0.in-addr.arpa" IN {$
\ttype master;$
\tfile "named.zero";$
\tallow-update { none; };$
};$
$
include "/etc/rndc.key";$
[root@alpha ~]#
答案1
把点去掉。代替:
zone "190.168.172.in-addr.arpa." IN {
type master;
file "172.168.190.rev.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa." IN {
type master;
file "localhost.rev.zone";
allow-update { none; };
};
它应该是:
zone "190.168.172.in-addr.arpa" IN {
type master;
file "172.168.190.rev.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "localhost.rev.zone";
allow-update { none; };
};