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

相关推荐
pipip.26 分钟前
UDP————套接字socket
linux·网络·c++·网络协议·udp
Félix25130 分钟前
计算机网络笔记(不全)
网络·计算机网络
朱包林3 小时前
day45-nginx复杂跳转与https
linux·运维·服务器·网络·云计算
bcbobo21cn9 小时前
初步了解Linux etc/profile文件
linux·运维·服务器·shell·profile
Absinthe_苦艾酒9 小时前
计算机网络(三)传输层TCP
网络·tcp/ip·计算机网络
GLAB-Mary10 小时前
AI会取代网络工程师吗?理解AI在网络安全中的角色
网络·人工智能·web安全
敲敲敲-敲代码11 小时前
【ArcGIS10.2】网络数据集构建---最短路径分析
网络·arcgis
帅次11 小时前
Objective-C面向对象编程:类、对象、方法详解(保姆级教程)
flutter·macos·ios·objective-c·iphone·swift·safari
fengyun289112 小时前
Mac电脑 卸载工具 App Cleaner
macos
cliffordl12 小时前
MCP 传输机制(Streamable HTTP)
网络·网络协议·http