萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Windows XP 教學

Windows 防火牆無法啟動?三大原因與完整修復方案

防火牆是電腦的安全堡壘,能阻擋病毒與入侵。但許多用戶發現 Windows 防火牆無法啟動,造成安全隱患。本文整理三大常見成因與分級解決方案,助你重建防線。

成因一:群組原則配置錯誤

  1. 執行 gpedit.msc 開啟群組原則編輯器。
  2. 依序展開:電腦設定 → 管理範本 → 網路 → 網路連線 → Windows 防火牆。
  3. 將相關強制限制項目設為「已啟用」,再改回「未設定」。
  4. 若登錄檔被軟體修改但群組原則未反映,需先設定再還原以刷新狀態。

成因二:安全中心服務停用

  1. 執行 services.msc 開啟服務管理。
  2. 將下列服務設為「自動」並啟動:
    • Security Center(安全中心)
    • Windows Firewall/Internet Connection Sharing (ICS)
    • Application Layer Gateway Service
  3. 若仍無法啟動,開啟登錄檔編輯器(regedit),刪除兩個鍵值:
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall
    HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\WindowsFirewall
    (至少會存在一項)
  4. 在服務中重新啟動 Windows Firewall/ICS。若仍提示「由群組原則控制」,不影響實際使用。

成因三:系統檔案遺失或損壞

因 SharedAccess.reg 遺失導致防火牆服務缺失。提供兩種修復法:

方法 1:呼叫安裝 API 重裝防火牆

  1. 命令提示字元執行:Rundll32 setupapi,InstallHinfSection Ndi-Steelhead 132 %windir%\inf\netrass.inf
  2. 重開機。
  3. 執行 Netsh firewall reset 重置防火牆。
  4. 執行 firewall.cpl 開啟防火牆設定,勾選「開啟(建議)」。

方法 2:匯入登錄檔重建服務項目

將下列內容存為 Sharedaccess.reg 並雙擊匯入(修改登錄檔有風險,請先備份):

Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess]
"DependOnGroup"=hex(7):00,00
"DependOnService"=hex(7):4e,00,65,00,74,00,6d,00,61,00,6e,00,00,00,57,00,69,00,6e,00,4d,00,67,00,6d,00,74,00,00,00,00,00
"Description"="Provides network address translation, addressing, name resolution and/or intrusion prevention services for a home or small office network."
"DisplayName"="Windows Firewall/Internet Connection Sharing (ICS)"
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,6b,00,20,00,6e,00,65,00,74,00,73,00,76,00,63,00,73,00,00,00
"ObjectName"="LocalSystem"
"Start"=dword:00000002
"Type"=dword:00000020
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch]
"Epoch"=dword:00002cd0
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters]
"ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,70,00,6e,00,61,00,74,00,68,00,6c,00,70,00,2e,00,64,00,6c,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List]
"%windir%\\system32\\sessmgr.exe"="%windir%\\system32\\sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List]
"%windir%\\system32\\sessmgr.exe"="%windir%\\system32\\sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Setup]
"ServiceUpgrade"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Setup\InterfacesUnfirewalledAtUpdate]
"All"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Enum]
"0"="Root\\LEGACY_SHAREDACCESS\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001
  1. 雙擊匯入,重開機。
  2. 執行 Netsh firewall reset 並開啟 firewall.cpl 設定防火牆。

重要提醒

防火牆無法防禦繞過它的直接連線(如 SLIP/PPP 直連外網)。實際環境中需結合安全策略、入侵偵測等多層防護,單靠防火牆不足以保證網路安全。

copyright © 萬盛學電腦網 all rights reserved