Dns
語法錯誤 /etc/named.conf
我正在嘗試在 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 ~]#
取出點。代替:
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; }; };