DNS搭建时老是报个错误,但不知错在哪里
本帖最后由 水底游 于 2013-07-20 09:18 编辑配置完DNS后报的错误信息# service named restart
Stopping named:
Starting named:
Error in named configuration:
zone ./IN: has 0 SOA records
localhost_resolver/./IN: bad zone
zone yunwei.com/IN: loaded serial 42
zone 30.19.172.in-addr.arpa/IN: loaded serial 1997022700
我贴下配置文件
name.conf# cat named.conf
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};named.rfc1912.zones# cat named.rfc1912.zones
zone "." IN {
type master;
file "named.ca";
};
zone "yunwei.com" IN {
type master;
file "yunwei.com.zone";
allow-update { none; };
};
zone "30.19.172.in-addr.arpa" IN {
type master;
file "30.19.172.in-addr.arpa.zone";
allow-update { none; };
};正向解析配置文件
yunwei.com.zone# cat yunwei.com.zone
$TTL 86400
@ IN SOA dns1.yunwei.com. root.yunwei.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS dns1.yunwei.com.
IN NS dns2.yunwei.com.
IN MX 5 mail.yunwei.com.
dns1 IN A 172.19.30.8
dns2 IN A 172.19.30.20
www IN CNAME dns1.yunwei.com.
ftp IN CNAME dns2.yunwei.com.
mail IN CNAME dns2.yunwei.com.反向解析配置文件
30.19.172.in-addr.arpa.zone# cat 30.19.172.in-addr.arpa.zone
$TTL 86400
@ IN SOA dns1.yunwei.com. root.yunwei.com.(
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS dns1.yunwei.com.
IN NS dns2.yunwei.com.
1 IN PTR dns1.yunwei.com.
1 IN PTR www.yunwei.com.
2 IN PTR dns2.yunwei.com.
2 IN PTR ftp.yunwei.com.走过路过一定要看过啊,这是救小弟我水生火热之中啊。。 配置文件一堆錯誤。哥你先去了解下DNS原理 再弄吧。 zone "."的type应改是hint
zone "." IN {
type hint;
file "named.ca";
};
呵呵~回复 2# woxizishen
恩,谢了~回复 3# nbrr
页:
[1]