[DNS]
DNS的问题
我在局域网内架设一台DNS,为什么只能反向解析不能正向解析?
named.conf
// generated by named-bootconf.pl
acl test {
192.168.123/24;
};
options {
directory "/var/named";
pid-file "named.pid";
forward first;
forwarders {202.99.8.1;};
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "xiaobao.com" IN {
type master;
file "local.xiaobao.com";
allow-update { none; };
};
zone "123.168.192.in-addr.arpa" IN {
type master;
file "123.168.192.in-addr.arpa";
allow-update { none; };
};
include "/etc/rndc.key";
local.xiaobao.com
$TTL 86400
@ IN SOA nameserver.xiaobao.com. root.nameserver.xiaobao.com. (
200512114
28800
14400
3600000
86400 )
@ IN NS nameserver.xiaobao.com.
ebiz-qiantai IN A 192.168.123.55
nameserver.xiaobao.com IN A 192.168.123.33
123.168.192.in-addr.arpa
$TTL 86400
@ IN SOA nameserver.xiaobao.com. root.nameserver.xiaobao.com. (
200512112
28800
14400
3600000
86400 )
@ IN NS nameserver.xiaobao.com.
33 IN PTR nameserver.xiaobao.com.
55 IN PTR ebiz-qiantai.
用named-checkzone检查没问题
还有个问题为什么过了一段时间用named-checkzone检查出现以下错误提示:
123.168.192.in-addr.arpa:1: unknown option '$TTL'
123.168.192.in-addr.arpa:12: unexpected token near end of file
这个怎么去解决,谢谢!