Firewall คืออะไร?
Firewall เป็นระบบความปลอดภัย (Hardware หรือ Software) ที่ Monitor และ Filter Traffic เข้า-ออก ตาม Security Policies ขององค์กร ทำหน้าที่เป็น "กำแพงกั้น" ระหว่าง Private Network (Trusted) และ Public Internet (Untrusted)
3 ประเภท Firewall หลัก (Traditional Classification)
- Packet Filtering Firewall: ตรวจสอบ Header (Source/Dest IP, Port, Protocol) ตาม Rule Set ไม่ดู Payload/State
- Stateful Inspection Firewall: ติดตาม State ของ Connection (TCP Handshake) รู้ว่ Packet นี้เป็นส่วนของ Connection ที่ Established แล้วหรือไม่
- Proxy Firewall (Application Gateway): ทำหน้าที่ Middleman ต่อ Connection แทน Client ตรวจสอบ Layer 7 (Application Layer) เช่น HTTP, FTP, DNS
Next-Generation Firewall (NGFW) - มาตรฐานปัจจุบัน
รวม Stateful Inspection + Application Awareness (Layer 7) + IPS + Threat Intelligence + SSL Inspection + User Identity Awareness
- FortiGate (Fortinet)
- Palo Alto Networks PA-Series
- Check Point Quantum
- Cisco Secure Firewall (Firepower)
- Sophos XGS
Firewall Types ตาม Layer (OSI Model)
| Layer | ประเภท | คำอธิบาย |
|---|---|---|
| Layer 3 | Packet Filter | ดู IP/Port/Protocol (Stateless) |
| Layer 4 | Stateful Firewall | ดู TCP/UDP Session State |
| Layer 7 | Application/Proxy Firewall | ดู Application Payload (HTTP, TLS SNI, DNS Query) |
ทำไมต้องมี Firewall?
- บล็อก Unsolicited Inbound Traffic
- ป้องกัน Hackers/Malware เข้าถึงข้อมูล nhạy cảm
- Enforce Security Policies (Allow/Deny by App, User, GeoIP)
- Logging & Auditing สำหรับ Compliance
- VPN Termination (Site-to-Site, Remote Access)
Firewall Architecture แบบมาตรฐาน
- DMZ (Demilitarized Zone): Public-facing Servers (Web, Mail)
- Internal Network: Workstations, Servers, Databases
- Management Network: Firewall Mgmt, Monitoring, Logs
Best Practices
- Default Deny (Block All, Allow Only Needed)
- Least Privilege Rules
- Regular Rule Review & Cleanup (Remove Unused/Shadowed Rules)
- Enable Logging & Send to SIEM
- Firmware/Signature Updates ทุกวัน
- HA (High Availability) สำหรับ Production
- SSL/TLS Inspection (Decrypt & Inspect Encrypted Traffic)
คำถามทั่วไป
Q: เปิด Firewall บน Windows/Linux ได้ไหม?
A: ได้ - Host-based Firewall (Windows Defender Firewall, iptables/nftables, ufw) เป็น Layer เพิ่มเติม (Defense in Depth)
Q: Firewall ป้องกัน Virus ได้หมดไหม?
A: ไม่ - Firewall ควบคุม Network Traffic ต้องใช้ร่วม Antivirus/EDR/Email Gateway/Web Proxy