我正在尝试开发自己的dynamicDNS。 我在端口5353上为子域运行我自己的自定义DNS。ASCII图:
INET --->:53 Bind 9 --->:5353 node.js | V zone_files
我有example.com。 node.js DNS用于dyn.example.com。
在我的/etc/bind/named.conf.local中有:
zone "example.com" { type master; file "/etc/bind/db.com.example"; allow-transfer { zonetxfrsafe; }; }; zone "dyn.example.com" IN { # DYNAMIC type forward; forwarders { 127.0.0.1 port 5353; }; forward only; };
我甚至在我的example.com区域文件中添加了一个NS:
$TTL 86400 @ IN SOA ns.example.com. hostmaster.example.com. ( 2013070104 ; Serial 7200 ; Refresh 1200 ; Retry 2419200 ; Expire 86400 ) ; Negative Cache TTL ; NS ns ; inet of our nameserver ns A 1.2.3.4 ; NS record for subdomain dyn NS ns
当我尝试从子域服务器获取logging时,无法转发:
dig @127.0.0.1 test.dyn.example.com
但是,如果我在/etc/bind/named.conf.options中recursion:
options { recursion yes; }
..然后我可以看到请求去子域服务器。
但我不想 recursion yes; 在我的绑定configuration,因为这是不好的安全做法(并允许与我的pipe理区域无关的所有和杂项请求)。
如何只为一个区域转发(代理)区域查询? 或者我完全放弃绑定,并find一个实际上可以转发特定查询的DNS服务器?
这是不能做到的。 查询转发是recursion的一种forms,并且按照预期行事。
您必须将您的dynamicDNS设置为自己的离散名称服务器,或者closures区域传输。