记一次Mac 匪夷所思终端常用网络命令恢复记录

一天莫名奇妙发现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。

相关推荐
unique_pursuit3 分钟前
CS144 Lab 6 实战记录:构建 IP 路由器
网络·tcp/ip·智能路由器
网络之路Blog18 分钟前
【实战中提升自己】内网安全部署之端口隔离与MAC地址认证
安全·macos·网络之路一天·华为华三数通基础·华为华三企业实战架构·华为中小型企业实战·华为华三计算机网络基础
心随_风动27 分钟前
主流操作系统对比分析(macOS、Linux、Windows、Unix)
linux·windows·macos
lxw18449125141 小时前
macOS 系统设置息屏情况下,PHP等后台脚本继续执行
macos
lllsure1 小时前
SpringCloud——负载均衡
服务器·网络·spring cloud
Brian_Lucky4 小时前
在 macOS 上合并 IntelliJ IDEA 的项目窗口
java·macos·intellij-idea
撬动未来的支点4 小时前
【网络】TCP/IP协议学习
网络·学习·tcp/ip
wqdian_com4 小时前
“广州丰田汽车.网址”中文域名仲裁案:“网络门牌”保护战
网络
草海桐5 小时前
go 的 net 包
网络·golang·net
lboyj5 小时前
5G/6G通信设备中的盲埋孔技术突破
网络