记一次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。

相关推荐
pe7er17 小时前
macOS 应用无法打开(权限问题)解决方案
macos·mac
DianSan_ERP3 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅3 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
2501_946205523 天前
晶圆机器人双臂怎么选型?适配2-12寸晶圆的末端效应器有哪些?
服务器·网络·机器人
linux kernel3 天前
第七部分:高级IO
服务器·网络
数字护盾(和中)3 天前
BAS+ATT&CK:企业主动防御的黄金组合
服务器·网络·数据库
~远在太平洋~3 天前
Debian系统如何删除多余的kernel
linux·网络·debian
unfeeling_3 天前
Keepalived实验
linux·服务器·网络
坐吃山猪3 天前
OpenClaw04_Gateway常见问题
网络·gateway·openclaw
上海云盾商务经理杨杨3 天前
2025年重大网络安全事件回顾与趋势分析
网络·安全·web安全