我正在运行 Scientific Linux 6.3,刚刚将计算机更新为 dnsmasq-2.48-13.el6.x86_64。该机器的本地 IP 为 192.168.1.100。我有一个本地缓存 DNS 设置,在更新之前一直有效。
/etc/dnsmasq.conf配置:
strict-order
listen-address=192.168.1.100
bind-interfaces
cache-size=5000
Run Code Online (Sandbox Code Playgroud)
我确认 dnsmasq 正在运行,端口在我启动和停止 dnsmasq 时打开和关闭。
$ netstat -nl # shows that the port was opened
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.100:53 0.0.0.0:* LISTEN
udp 0 0 192.168.1.100:53 0.0.0.0:*
Run Code Online (Sandbox Code Playgroud)
但尝试解决失败
$ nslookup google.com 192.168.1.100
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached
Run Code Online (Sandbox Code Playgroud)
即使尝试 telnet 也失败
$ telnet 192.168.1.100 53
Trying 192.168.1.100...
telnet: …
Run Code Online (Sandbox Code Playgroud)