15 dns
在我们的防火墙工作中,我的机器经常为我们的某些域解析为错误的IP.我们有一个DNS服务器,它是我们的主DNS,用于将外部域解析为内部IP地址(192.XXX而不是公共IP).
有时我会解决公共IP,它不会通过我们的防火墙正确路由.发生这种情况时,我会运行:
ipconfig /flushdns
nslookup code.mydomain.com - I get the right DNS server and the right internal IP
ping code.mydomain.com - I get the wrong external IP address.
Run Code Online (Sandbox Code Playgroud)
发生这种情况时,Firefox也会解析为错误的IP.这将在一天中间歇性地发生.
var*_*tec 11
nslookup仅使用DNS,而ping将首先查看hosts
文件.
例:
nslookup localhost
Server: 208.67.220.220
Address: 208.67.220.220#53
Non-authoritative answer:
Name: localhost.local.lan
Address: 67.215.65.132
Run Code Online (Sandbox Code Playgroud)
67.215.65.132表示不存在的域OpenDNS(hit-nxdomain.opendns.com)
ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
...
Run Code Online (Sandbox Code Playgroud)