这是我的未绑定配置的相关部分(完整配置是Here):
private-domain: "test.lan"local-zone: "0.0.10.in-addr.arpa." nodefaultstub-zone: name: "test.lan" stub-host: unsd_nsd3forward-zone: name: "." forward-addr: 8.8.8.8 # Google Public DNS forward-addr: 74.82.42.42 # Hurricane Electric forward-addr: 4.2.2.4 # Level3 Verizon
这是unbound的输出,日志级别为3.我运行dig mithril.test.lan @localhost作为测试(当直接查询nsd3时它正确解析):
[1448909203] unbound[1:0] deBUG: valIDator[module 0] operate: extstate:module_state_initial event:module_event_moddone[1448909203] unbound[1:0] info: valIDator operate: query unsd_nsd3. A IN[1448909203] unbound[1:0] deBUG: iterator[module 1] operate: extstate:module_wait_subquery event:module_event_pass[1448909203] unbound[1:0] info: iterator operate: query mithril.test.lan. A IN[1448909203] unbound[1:0] info: processqueryTargets: mithril.test.lan. A IN[1448909203] unbound[1:0] info: new psIDe target unsd_nsd3. A IN[1448909203] unbound[1:0] deBUG: iterator[module 1] operate: extstate:module_state_initial event:module_event_pass[1448909203] unbound[1:0] info: iterator operate: query unsd_nsd3. A IN[1448909203] unbound[1:0] info: resolving unsd_nsd3. A IN[1448909203] unbound[1:0] info: processqueryTargets: unsd_nsd3. A IN[1448909203] unbound[1:0] info: sending query: unsd_nsd3. A IN[1448909203] unbound[1:0] deBUG: sending to target: <.> 74.82.42.42#53[1448909203] unbound[1:0] deBUG: cache memory msg=132347 rrset=132399 infra=5449 val=132392[1448909203] unbound[1:0] deBUG: iterator[module 1] operate: extstate:module_wait_reply event:module_event_reply[1448909203] unbound[1:0] info: iterator operate: query unsd_nsd3. A IN[1448909203] unbound[1:0] info: response for unsd_nsd3. A IN[1448909203] unbound[1:0] info: reply from <.> 74.82.42.42#53[1448909203] unbound[1:0] info: query response was NXDOMAIN ANSWER[1448909203] unbound[1:0] info: finishing processing for unsd_nsd3. A IN[1448909203] unbound[1:0] deBUG: valIDator[module 0] operate: extstate:module_state_initial event:module_event_moddone[1448909203] unbound[1:0] info: valIDator operate: query unsd_nsd3. A IN[1448909203] unbound[1:0] deBUG: iterator[module 1] operate: extstate:module_wait_subquery event:module_event_pass[1448909203] unbound[1:0] info: iterator operate: query mithril.test.lan. A IN[1448909203] unbound[1:0] info: processqueryTargets: mithril.test.lan. A IN[1448909203] unbound[1:0] deBUG: out of query targets -- returning SERVFAIL[1448909203] unbound[1:0] deBUG: return error response SERVFAIL[1448909203] unbound[1:0] deBUG: valIDator[module 0] operate: extstate:module_wait_module event:module_event_moddone[1448909203] unbound[1:0] info: valIDator operate: query mithril.test.lan. A IN[1448909203] unbound[1:0] deBUG: cache memory msg=132557 rrset=132624 infra=5449 val=132392
作为旁注,我在debian基本映像中的自己的docker容器中运行unbound和nsd3,并将它们链接在一起.我可以在未绑定的容器中解析unsd_nsd3.这是未绑定容器中的/ etc / hosts:
172.17.0.6 a79a91df9ec5127.0.0.1 localhost::1 localhost ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allrouters172.17.0.5 docker_nsd3 89a74b365c88 unsd_nsd3172.17.0.5 unsd_nsd3 89a74b365c88
我已经没有关于如何从这里前进的想法.一些帮助将不胜感激.
解决方法 Unbound不使用/ etc / hosts. Unbound只能通过上游转发来解析stub-name unsd_nsd3.您需要设置local-zone和local-data以反映/ hosts的内容,或者使用IP作为存根.为了简化迁移,source tarball有一个perl脚本,contrib / build-unbound-localzone-from-hosts.pl,用于生成包含文件.需要在exec之前的脚本内设置本地区域名称
总结以上是内存溢出为你收集整理的domain-name-system – 未使用/ etc / hosts解析的未绑定存根主机选项全部内容,希望文章能够帮你解决domain-name-system – 未使用/ etc / hosts解析的未绑定存根主机选项所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)