我想知道是否有任何方法来configurationBIND服务器来回答基于logging的本地值的查询,如果它不在那里,转发请求到configuration的recursion服务器。
例
test.com保存在本地BIND DB文件中
... x A 1.2.3.4 ...
并在“公共”DNS上
... x A 5.6.7.8 y A 2.0.0.2 ...
如果我要求x我想得到答案1.2.3.4但如果我要求y我想我的服务器响应2.0.0.2 。
这是dnsmasq包含的function,当你添加主机到/etc/hosts文件,但我想知道是否:
如果我正确理解你,你需要使用视图
acl "local_network" { 192.168.0.0/16; 127.0.0.0/8; }; ... view "internal" in { match-clients { local_network; }; recursion yes; additional-from-auth yes; additional-from-cache yes; zone "." in { type hint; file "named.root"; }; zone "test.com" IN { type master; file "master/test.com_int"; allow-query { local_network; }; allow-transfer { none; }; allow-update { none; }; }; ... } view "external" in { match-clients { !local_network; any; }; recursion no; zone "test.com" IN { type master; file "master/test.com_ext"; allow-query { all; }; allow-transfer { none; }; allow-update { none; }; }; ... };