linux9配置域名反向解析
#tail -f /var/log/messages
======
Jan 29 11:14:38 hz named[21919]: dns_master_load: test.local:8: unknown RR type '@'
Jan 29 11:14:38 hz named[21919]: zone 60.18.202.in-addr.arpa/IN: loading master file test.local: unknown class/type
#vi test.local
======
$TTL 86400
@ IN SOA test.com. root.test.com.(
20031001;
7200;
3600;
43200;
86400);
@ IN NS test.com. //修改@并取消前面的空格后,tail messages就正常了。
253 IN PTR dns.test.com.
vi /etc/named.conf
=======
...
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "test.com" IN {
type master;
file "test.zone";
allow-query { any; };
allow-transfer { any; };
allow-update { none; };
};
zone "60.18.202.in-addr.arpa" IN {
type master;
file "test.local";
allow-update { none; };
};
include "/etc/rndc.key";
#vi /var/named/test.zone
========
$TTL 86400 ; 1D
@ IN SOA ns.test.com. root.test.com. (
2005041402 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
7200 ) ; Minimum
A 202.18.60.253
NS ns.test.com.
NS ns1.online.com.
MX 10 mail.test.com.
test.com. IN A 202.18.60.253
ns IN A 202.18.60.253
www IN A 202.18.60.253
mail IN A 202.18.60.21