Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Vista 能上網卻 Ping 不通?Windows 防火牆封鎖 ICMP 的排查與放行設定

編輯:Windows Vista 常見問題解答

現象:Vista 旗艦版可瀏覽網頁、上 QQ,但 ping 192.168.1.1 回傳「一般失敗」,僅能 ping 通 127.0.0.1。XP 同環境正常。主因:**Windows 防火牆預設封鎖 ICMP 封包**。

解決步驟 (需管理員權限)

  1. 控制台 → 管理工具 → 高階安全性 Windows 防火牆。
  2. 左側選「輸入規則」/「輸出規則」 → 右側「新增規則」。
  3. 規則類型選「自訂」 → 通訊協定選「ICMPv4」/「ICMPv6」 → 依需求允許特定 ICMP 類型 (如 Echo Request 類型 8、Echo Reply 類型 0)。
  4. 範圍、設定檔按預設 → 名稱輸入「Allow ICMP」完成。

或透過命令列快速放行:

netsh advfirewall firewall add rule name="Allow ICMPv4 In" protocol=icmpv4:8,any dir=in action=allow
netsh advfirewall firewall add rule name="Allow ICMPv4 Out" protocol=icmpv4:0,any dir=out action=allow

設定後 ping 即恢復正常,不影響一般網路存取。

Copyright © Windows教程網 All Rights Reserved