一天莫名奇妙发现ping dig 等基础命令都无法正常使用。还好能浏览器能正常访问,,,,
赶紧拿baidu试试^-^
; <<>> DiG 9.10.6 <<>> baidu.com
;; global options: +cmd
;; connection timed out; no servers could be reached
ping: cannot resolve www.baidu.com: Unknown host
看到这是不是一开始以为dns被污染了,赶紧查下dns配置,一看也都挺正常.
#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
# scutil --dns
#
# SEE ALSO
# dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 114.114.114.114
还刷新了好几次dns,然并卵...有点抓狂了...
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
由于工作日要上班,将就了2天,晚上回到家仍不死心,接着搞
偶然看到一个说可能开了防火墙,一看果然。把firewall关闭,一下子都恢复正常了 哈哈哈,,心情大爽。不知道什么时候手残设置了这个,折腾了2天 。
记之于此 20240924 23:43。