- 论坛徽章:
- 0
|
用Bind做了一台DNS服务器,发现在服务器本机上用host或nslookup查询成功,但用其他PC查询失败。
在其他PC上执行nalookup,先反响查询服务器域名,可以成功;但再查询主机地址,服务器不回包。 配置如下,不知道是什么问题。iptables stop掉了。
#named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
allow-query { any; };
/*
* 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
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
};
zone "ma.com" IN {
type master;
file "ma.com.zone";
};
zone "0.0.202.in-addr.arpa" IN {
type master;
file "202.0.0.zone";
};
include "/etc/rndc.key";
___________
#ma.com.zone
$TTL 86400
@ IN SOA snap.ma.com. root.snap.ma.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
ma.com. IN NS snap.ma.com.
host1 IN A 202.0.0.110
host2 IN A 202.0.0.120
host3 IN A 202.0.0.130
host4 IN A 202.0.0.140
___________
#202.0.0.zone
$TTL 86400
@ IN SOA snap.ma.com. root.snap.ma.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS snap.ma.com.
3.0.0.202.in-addr.arpa. IN PTR snap.ma.com.
110 IN PTR host1.ma.com.
120 IN PTR host2.ma.com.
130 IN PTR host3.ma.com.
140 IN PTR host4.ma.com. |
|