DMZ (Demilitarized Zone) ในเครือข่ายคืออะไร?
DMZ (Demilitarized Zone / เขตปลวก) เป็น เครือข่ายย่อย (Subnetwork) ที่อยู่ระหว่างเครือข่ายภายในองค์กร (Internal Network / LAN - Trusted) และเครือข่ายภายนอก (Internet - Untrusted) ทำหน้าที่เป็น Buffer Zone (เขตบ퍼) ที่วางบริการที่ต้องเปิดให้เข้าถึงจากภายนอก (Public-facing Services) เพื่อปกป้องเครือข่ายภายใน
🏗️ สถาปัตยกรรม DMZ (Typical Architecture)
Internet (Untrusted)
│
▼
[External Firewall] ──► DMZ (Web Server, Mail Server, DNS, VPN Gateway, Proxy, API Gateway)
│
▼
[Internal Firewall] ──► Internal Network (LAN) (Database, AD, File Server, Workstations, OT/ICS)
• External Firewall: กรองトラฟฟิกจาก Internet เข้า DMZ (Allow เฉพาะ Port ที่จำเป็น: 80, 443, 25, 53, 443/VPN)
• Internal Firewall: ควบคุมトラฟฟิกจาก DMZ เข้า Internal (Allow เฉพาะที่จำเป็นจริง: App Server → DB Port 1433/3306)
🛡️ ทำไม DMZ จึงสำคัญ? (Benefits)
- Defense in Depth (การป้องกันหลายชั้น): โจมตีต้องผ่าน External FW → DMZ Host → Internal FW จึงจะถึง LAN
- Isolation (การแยก隔离): หาก Server ใน DMZ ถูกบุก (Compromised) โจมตียังไม่เข้าถึง LAN โดยตรง
- Access Control แบบละเอียด: กฎไฟร์วอลล์ระหว่าง DMZ ↔ LAN จำกัดเฉพาะ Port/IP/Protocol ที่จำเป็น
- Monitoring & Logging: จุดตรวจสอบ (Choke Point) ตรวจสอบトラฟฟิกน่าสงสัยระหว่างโซน
- Compliance: มาตรฐานหลายอย่าง (PCI DSS, NIST, ISO 27001) กำหนดให้แยก Public-facing Systems
🌐 บริการที่วางใน DMZ (Typical DMZ Hosts)
- Web Servers (HTTP/HTTPS), Reverse Proxies, Load Balancers
- Email Servers (SMTP/IMAP/POP3 - MTA), Spam Filters
- DNS Servers (Authoritative DNS)
- VPN Gateways / Remote Access Servers
- FTP/SFTP Servers, API Gateways
- VoIP/SBC (Session Border Controllers)
- Certificate Authorities (Public CA)
⚠️ ความเสี่ยงและข้อจำกัดของ DMZ
- DMZ Hosts เป็นเป้าหมายหลัก: ถูกโจมตีโดยตรงจาก Internet ต้อง Harden อย่างเข้มข้น (Patch, Minimal Services, WAF, HIDS/HIPS)
- Pivot Attack: หาก DMZ Host ถูกครอบครอง อาจใช้เป็นจุดกระโดด (Pivot) โจมตี Internal FW/LAN
- Complexity & Cost: ต้องการ Firewall 2 ตัว (หรือ 1 ตัวมี 3 Interface), IP Public เพิ่ม, การจัดการซับซ้อน
- Not a Silver Bullet: DMZ ไม่ป้องกันโจมตีระดับแอปพลิเคชัน (SQLi, XSS, RCE) บน Web Server เอง → ต้องมี WAF, Secure Coding, DAST/SAST
- Cloud/Modern Architecture: ใน Cloud ใช้ Security Groups, NACLs, Subnets (Public/Private) แทน DMZ ทางกายภาพ แนวคิดเดียวกันแต่ Virtualized
🔥 DMZ vs Firewall: ต่างอย่างไร?
| คุณสมบัติ | Firewall | DMZ |
|---|---|---|
| คืออะไร | อุปกรณ์/ซอฟต์แวร์กรองトラฟฟิก | โซนเครือข่าย (Network Segment/Architecture) |
| หน้าที่ | Enforce Policies (Allow/Deny) | Isolate Public Services from Internal Network |
| ตำแหน่ง | Edge (Perimeter) หรือระหว่างโซน | ระหว่าง External FW และ Internal FW |
| ความสัมพันธ์ | เป็นเครื่องมือสร้าง/บังคับ DMZ | เป็นผลลัพธ์ของการออกแบบด้วย Firewall |