Windows Defender Firewall with Advanced Security (WFAS) คืออะไร?
เป็น Host-based, Two-way Firewall ที่กรองทราฟฟิก Inbound/Outbound ตามกฎ (Rules) รองรับ IPsec, Connection Security Rules, Group Policy Deployment เหมาะสำหรับ Enterprise มากกว่า GUI แบบ Basic
วิธีเปิด WFAS
- Run (Win+R) >
wf.msc - Control Panel > System and Security > Windows Defender Firewall > Advanced settings
- Start > ค้นหา "Windows Defender Firewall with Advanced Security"
ตัวเลือกขั้นสูง (Advanced Options) ที่สำคัญ
1. Rule Types (4 ประเภทกฎหลัก)
| ประเภทกฎ | วัตถุประสงค์ |
|---|---|
| Inbound Rules | บล็อก/อนุญาตการเชื่อมต่อเข้ามา (เช่น บล็อก RDP จาก Internet) |
| Outbound Rules | ควบคุมการเชื่อมต่อออกไป (เช่น บล็อก PowerShell ออก Internet) |
| Connection Security Rules | กำหนด IPsec: Require Authentication, Encryption, Integrity |
| Custom Rules | กำหนดเงื่อนไขละเอียด: Program, Port, Protocol, IP Scope, User, Computer, Interface Type |
2. Profile Settings (3 โปรไฟล์)
- Domain Profile - เมื่ออยู่ใน Domain (Corporate)
- Private Profile - เครือข่ายส่วนตัว/บ้าน (Trusted)
- Public Profile - เครือข่ายสาธารณะ (Cafe, Airport) - Strictest
แต่ละโปรไฟล์ตั้งค่าได้แยกกัน: State (On/Off), Inbound/Outbound Default Action, Notifications, Unicast Response
3. Monitoring & Logging (การตรวจสอบและบันทึก)
- Firewall Logs - %systemroot%\system32\LogFiles\Firewall\pfirewall.log (Default: Dropped packets only)
- ตั้งค่า Log: Dropped packets, Successful connections, Max size, Path
- Monitoring Node - ดู Active Rules, Connection Security Rules, Security Associations (IPsec) แบบ Real-time
4. IPsec Integration (Connection Security)
- Authentication: Kerberos v5, NTLMv2, Certificate (PKI), Preshared Key (ไม่แนะนำ)
- Integrity/Encryption Algorithms: AES-GCM, AES-CBC, SHA-256/384
- Mode: Transport (End-to-End) vs Tunnel (Gateway-to-Gateway)
- Exemptions: ICMP, Kerberos, RSVP, DHCP (Default)
5. Group Policy Deployment (Enterprise)
GPO Path: Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security
- Deploy Rules ทั่ว Organization
- Import/Export Policy (.wfw file)
- Precedence: Local < Domain < OU < Site (Last write wins)
Security Policies ที่เกี่ยวข้อง (Local Security Policy - secpol.msc)
| Policy | คำอธิบาย |
|---|---|
| Network Security: LAN Manager Authentication Level | บังคับ NTLMv2, ปิด LM/NTLMv1 (Replay Protection) |
| Network Access: Sharing and Security Model | Classic vs Guest only |
| Network Access: Do not allow anonymous enumeration | บล็อก Anonymous SID/Name translation |
| System Cryptography: Use FIPS compliant algorithms | บังคับ FIPS 140-2 (อาจทำให้บางแอพพัง) |
Microsoft Defender for Endpoint / ATP (Advanced Threat Protection)
- Defender for Endpoint (MDE) - EDR/XDR บน Endpoint (Behavioral, Cloud ML)
- Defender for Identity (Azure ATP) - ตรวจจับการโจมตี AD (Pass-the-Hash, Golden Ticket)
- Defender for Office 365 (ATP) - Email/URL Protection, Safe Links/Attachments
- Defender for Cloud Apps (MCAS) - CASB, Shadow IT Discovery
ราคา: Plan 1 (P1) ~$2.50/user/mo, Plan 2 (P2) ~$5.20/user/mo (รวมใน M365 E5)
WFAS เพียงพอสำหรับ Enterprise หรือไม่?
เพียงพาสำหรับ Host-based Firewall แต่ควรใช้ร่วมกับ:
- Network Firewall (Palo Alto, FortiGate, Check Point) - Perimeter
- EDR/XDR (MDE, CrowdStrike) - Endpoint Detection
- Network Detection & Response (NDR) - East-West Traffic
- Centralized Management (GPO, Intune, SCCM/MECM, Panorama, FortiManager)
การปิด/เปิด WFAS
PowerShell (Admin):
# Enable all profiles
Set-NetFirewallProfile -All -Enabled True
# Disable specific profile
Set-NetFirewallProfile -Name Public -Enabled False
# Check status
Get-NetFirewallProfile | ft Name, Enabled, DefaultInboundAction, DefaultOutboundAction