自 Windows Vista 起,Windows 防火牆已演進為雙向過濾、具備進階安全性 (WFAS) 的核心元件,不再像 XP 時期功能單薄。即使安裝第三方防火牆,內建防火牆仍建議保持啟用,可提供纏繞防禦、補充應用層規則,並與 IPsec、網路位置感知 (NLA) 整合,提升整體防護深度。
C:\Program Files\MyApp\app.exe)。wf.msc 或在防火牆主視窗點選 [進階設定]。在 [連線安全規則] 建立「伺服器對伺服器」、「通道」或「自訂」規則,要求驗證 (Kerberos、憑證、PSK) 並加密傳輸,保護敏感資料 (如資料庫複寫、管理流量)。
%systemroot%\system32\LogFiles\Firewall\pfirewall.log。netsh advfirewall show allprofiles 檢視目前原則,netsh advfirewall firewall show rule name=all 列出所有規則。# 開放 TCP 3389 (遠端桌面)
netsh advfirewall firewall add rule name="RDP" dir=in action=allow protocol=TCP localport=3389
# 封鎖特定程式出站
netsh advfirewall firewall add rule name="Block Chrome" dir=out action=block program="C:\Program Files\Google\Chrome\Application\chrome.exe"
# 匯出/匯入原則
netsh advfirewall export "C:\Win7FW.wfw"
netsh advfirewall import "C:\Win7FW.wfw"
熟練掌握 Windows 7 防火牆的基本與進階功能,能大幅降低惡意程式橫向移動、資料外洩與未授權存取風險。