当我在ISP的DNS服务器上查询foo.example.com时,它返回的内容如下:
;; ANSWER SECTION: foo.example.com. 159 IN A 192.168.40.20
(请注意,IP地址是本地IP地址)
当我在DNSMasq上执行相同操作时,响应为空; A记录丢失了.它适用于我尝试过的每个其他地址.
解决方法
您可能在
this option启用了dnsmasq的
rebind protection:
--stop-dns-rebind Reject (and log) addresses from upstream nameservers which are in the private IP ranges. This blocks an attack where a browser behind a firewall is used to probe machines on the local network.
您可以通过删除此选项完全禁用此功能,也可以使用此选项将某些域列入白名单:
--rebind-domain-ok=example.com