Computer >> Hướng Dẫn Máy Tính >  >> Kết Nối Mạng >> An Ninh Mạng

Windows Defender Firewall với Bảo mật nâng cao (Advanced Security): Tính năng, cấu hình và best practice

Windows Defender Firewall with Advanced Security (WFAS) là gì?

Là tường lửa máy chủ (host-based firewall) tích hợp sẵn trong Windows (Client & Server), cung cấp lọc gói tin hai chiều (inbound/outbound) dựa trên quy tắc: địa chỉ IP, port, giao thức, ứng dụng, người dùng, nhóm mạng (Domain/Private/Public), và tích hợp IPsec cho kết nối bảo mật.

Tính năng nâng cao so với giao diện cơ bản

  • Quy tắc Outbound chi tiết (chặn ứng dụng gọi ra ngoài).
  • Connection Security Rules (IPsec): Yêu cầu xác thực/mã hóa giữa máy tính.
  • Monitoring: Xem quy tắc active, security associations, main mode/quick mode SA.
  • Import/Export Policy: Triển khai qua GPO (Group Policy) cho hàng nghìn máy.
  • Custom Action: Allow/Block/Allow if secure (IPsec).
  • Scoped rules: Áp dụng cho interface, profile, user/group, service cụ thể.

Mở WFAS

  1. Win + R → wf.msc → Enter.
  2. Hoặc: Control Panel → System and Security → Windows Defender Firewall → Advanced settings.
  3. Hoặc: Server Manager → Tools → Windows Defender Firewall with Advanced Security.

Các loại quy tắc (Rule Types)

LoạiMục đích
Inbound RulesChấp nhận/từ chối kết nối đến máy (ví dụ: cho phép RDP 3389 từ subnet quản trị).
Outbound RulesKiểm soát kết nối đi từ máy (ví dụ: chặn PowerShell gọi internet, cho phép update Windows).
Connection Security RulesBắt buộc IPsec (Authentication/Encryption) cho luồng giữa 2 máy/nhóm máy.

5 thành phần của chính sách bảo mật (Security Policy)

  1. Tính bảo mật (Confidentiality)
  2. Toàn vẹn (Integrity)
  3. Sẵn sàng (Availability)
  4. Tính xác thực (Authenticity)
  5. Phối kháng (Non-repudiation)

Best Practice cấu hình WFAS doanh nghiệp

  1. Default Deny Inbound, Default Allow Outbound (lúc đầu), sau đó thu hẹp Outbound.
  2. Tạo GPO "Baseline Firewall" áp dụng cho toàn domain: bật Firewall cho 3 profile (Domain, Private, Public).
  3. Quy tắc Inbound: chỉ cho phép port/service cần thiết (RDP từ Jump Host, WinRM từ SCCM, SQL từ App Server).
  4. Quy tắc Outbound: chặn script engine (PowerShell, WScript, CScript) gọi internet; cho phép Windows Update, Defender ATP, NTP, DNS đến server nội bộ.
  5. Bật Connection Security Rules cho traffic nhạy cảm (SQL replication, DC-DC replication, backup).
  6. Bật logging: %systemroot%\system32\LogFiles\Firewall\pfirewall.log → forward sang SIEM.
  7. Test trong môi trường staging trước khi push GPO production.
  8. Đánh giá định kỳ (quarterly): rule review, unused rule cleanup, exception justification.

WFAS có đủ cho doanh nghiệp không?

Đủ cho workload cơ bản (workstation, server đơn lẻ). Chưa đủ cho môi trường phức tạp cần: Layer 7 inspection (IPS), SSL decryption, threat intelligence feed real-time, centralized management multi-vendor, high-throughput data center. Khi đó cần Next-Gen Firewall (Palo Alto, Fortinet, Check Point) tại biên và/hoặc micro-segmentation (Illumio, Guardicore, VMware NSX) cho east-west.

Bật/Tắt WFAS qua PowerShell

# Bật cho 3 profile
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True

# Tắt (KHÔNG KHUYẾN NGHỊ)
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled False

# Xem quy tắc active
Get-NetFirewallRule -Enabled True | Where-Object {$_.Direction -eq 'Inbound'} | Select-Object DisplayName, Action, Protocol, LocalPort, RemoteAddress

Kết luận

WFAS là lớp bảo vệ miễn phí, tích hợp sẵn, quản trị tập trung qua GPO – nên bật và cấu hình baseline cho mọi endpoint/server Windows. Đối với doanh nghiệp lớn, nó bổ sung cho (chứ không thay thế) tường lửa biên và giải pháp micro-segmentation.