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

相关推荐
G_H_S_3_17 小时前
【网络运维】Docker 存储:镜像层与数据卷的管理应用
linux·运维·网络·docker
还鮟19 小时前
靶机远程控制实验命令与入门实践(Linux)
linux·网络·安全
Hello.Reader20 小时前
Flink Process Table Functions(PTF)实战详解:把 SQL 变成“可编程算子”,状态、时间、定时器一把梭
网络·sql·flink
FreeBuf_20 小时前
朝鲜黑客组织“传染性面试“瞄准macOS:新型“DriverFixer“窃密工具浮出水面
macos·面试·职场和发展
2301_773730311 天前
网络编程—TCP传输控制协议
服务器·网络·tcp/ip
云老大TG:@yunlaoda3601 天前
华为云国际站代理商DAS的跨境合规适配是如何保障数据合规的?
网络·数据库·华为云
TG:@yunlaoda360 云老大1 天前
华为云国际站代理商DAS的跨境合规适配在游戏出海场景中的应用
服务器·网络·游戏·华为云
没有bug.的程序员1 天前
熔断、降级、限流:高可用架构的三道防线
java·网络·jvm·微服务·架构·熔断·服务注册
知新坊1 天前
飞牛NAS 没有公网 IP?使用它让 NAS 访问、文件远程像在局域网
网络·网络协议·tcp/ip
emma羊羊1 天前
【AWVS】漏扫工具
网络·安全·web安全·awvs