Tho*_*mas 1 domain-name-system bind nslookup
我已经设置了绑定服务器,但无法执行反向查找 nslookup。
配置文件看起来像这样。
acl "internal" {192.168.5.0/24;};
view "internal" {
match-clients {"internal";};
recursion yes;
zone "home" {
type master;
file "master/home.db";
};
zone "sludge.home" {
type master;
file "master/sludge.home.db";
};
zone "192.168.5.in-addr.arpa" {
type master;
file "master/192.168.5.db";
};
zone "255.in-addr.arpa" {
type master;
file "master/255.db";
};
zone "0.in-addr.arpa" {
type master;
file "master/0.db";
};
zone "." {
type hint;
file "master/root.hint";
};
zone "localhost" {
type master;
file "master/localhost.db";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "master/127.0.0.db";
};
};
Run Code Online (Sandbox Code Playgroud)
192.168.5.db 看起来像这样。
$TTL 4w
@ IN SOA dns.home. home. (
2011030403 ; serial
3h ; refresh after 1 week
1h ; retry after 1 week
1w ; expire after 1 week
1h ) ; negative caching TTL of 1 hour
IN NS dns.home.
12 IN PTR dns.home.
13 IN PTR firewall.home.
15 IN PTR sludge.home.
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助。
in-addr.arpa 地址的八位字节顺序相反,因此区域应该是
zone "5.168.192.in-addr.arpa" {
type master;
file "master/192.168.5.db";
};
Run Code Online (Sandbox Code Playgroud)
(文件名无关紧要,但您可能也想在那里切换以匹配)
请求的格式应为 12.5.168.192.in-addr.arpa。dig -x 192.168.5.12将自动执行此转换。
| 归档时间: |
|
| 查看次数: |
1601 次 |
| 最近记录: |