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

相关推荐
zizisuo7 小时前
面试篇:Spring Security
网络·数据库·安全
玉笥寻珍7 小时前
Web安全渗透测试基础知识之HTTP参数污染篇
网络·网络协议·安全·web安全·http
GCKJ_08248 小时前
观成科技:加密C2框架Vshell流量分析
网络·科技·信息与通信
大蚂蚁2号9 小时前
windows文件共享另一台电脑资源管理器网络文件夹无法找到机器
运维·服务器·网络
LetsonH10 小时前
Home Assistant 米家集成:开启智能家居新体验
网络·智能家居
欧先生^_^10 小时前
Docker 的各种网络模式
网络·docker·容器
彬彬醤10 小时前
查询电脑伪装IP,网络安全速查攻略!
网络·网络协议·tcp/ip·安全·web安全·http·https
爱笑的林羽12 小时前
Mac M系列 安装 jadx-gui
前端·macos
兴达易控12 小时前
Profibus DP主站转Modbus TCP网关接E+H流量计通讯案例
网络
熙曦Sakura12 小时前
【Linux网络】TCP全连接队列
linux·网络·tcp/ip