我正在为LAN使用10.0.0.x方案。我有一个Raspberry Pi,它托管某些服务,包括DNS。我遇到我的反向区域问题。
RPI在10.0.0.21上。我的域名是example.tk。当客户端请求server.example.tk时,它将回复56.234.67.45(已编辑为随机IP)。该DNS服务器还会回答来自WAN的DNS请求。我希望它以10.0.0.21答复,以便LAN上的客户端可以访问某些未转发的服务。我完成此操作的方法是使用反向DNS,对吗?
我的BIND9配置文件:
pi@raspberrypi /etc/bind $ cat named.conf.local
zone "example.tk" {
type master;
file "/etc/bind/zones/db.example.tk";
};
zone "0.0.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.10";
allow-update { none; };
};
pi@raspberrypi /etc/bind $ cd zones
pi@raspberrypi /etc/bind/zones $ cat db.example.tk
$TTL 604800
@ IN SOA ns.example.tk. root.localhost. (
6 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.example.tk.
ns IN A 50.161.83.76
server IN A 50.161.83.76
www IN CNAME server
play IN CNAME server
pi@raspberrypi /etc/bind/zones $ cat db.10
$TTL 604800
@ IN SOA ns.example.tk. root.localhost. (
99 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
0.0.10.in-addr.arpa. IN NS ns.example.tk.
21 IN PTR ns.example.tk.
21 IN PTR server.example.tk.
pi@raspberrypi /etc/bind/zones $
问题是,它永远不会为LAN上的客户端提供反向IP的答复。
我究竟做错了什么?
编辑:named-checkzone不返回任何错误。
反向DNS用于查找IP地址的名称,而不是IP地址作为名称。您需要配置拆分DNS进行正向查找。这可以通过两种方法来完成。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句