Firewall คืออะไร? (Network Firewall Security)
Firewall คือ ระบบความปลอดภัย (Hardware, Software หรือ Cloud) ที่ตรวจสอบและควบคุม Network Traffic ระหว่าง Zone (เช่น Internet ↔ DMZ, DMZ ↔ Internal) ตามกฎ (Rules/Policies) ที่กำหนดไว้ล่วงหน้า เพื่อ อนุญาต (Allow), บล็อก (Block/ Drop), หรือปฏิเสธ (Reject) การเชื่อมต่อที่น่าสงสัยหรือไม่ได้รับอนุญาต
🧱 ไฟร์วอลล์ 3 รุ่นหลัก (Evolution)
| Generation | Type | Key Capability | Limitations |
| 1st Gen | Packet Filter (Stateless) | ตรวจ Header (IP, Port, Protocol) ต่อ Packet | ไม่เห็น Context/State, แฮกได้ด้วย Fragmentation, Spoofing |
| 2nd Gen | Stateful Inspection | Track Connection State (TCP Handshake, Session Table) | ไม่เห็น Application Layer, ขยาย Scale ยาก |
| 3rd Gen (Current) | Next-Gen Firewall (NGFW) | App-ID, User-ID, Content-ID (IPS, AV, Sandbox, SSL Decrypt, DNS Security) | Complex, License Cost, Performance Impact (SSL Decrypt) |
🔥 ประเภท Firewall ตามรูปแบบการติดตั้ง
- Hardware Appliance: Physical Box (Palo Alto, FortiGate, Check Point, Cisco FTD) - High Performance, HA
- Virtual Firewall (VM): Run on Hypervisor (VM-Series, FortiGate-V, vSRX) - Cloud, Multi-tenant
- Cloud-Native / FWaaS: AWS Network Firewall, Azure Firewall, GCP Cloud Armor, Zscaler, Cloudflare
- Host-based / Endpoint FW: Windows Defender FW, iptables/nftables, pfSense (Software)
- Container/K8s Firewall: Calico, Cilium, CNI Plugins (Layer 3/4/7)
⚙️ การทำงาน 핵심 (How Firewall Works)
- Ingress Packet → Interface
- Ingress Processing: L2/L3 Check, NAT, Routing Lookup
- Policy Lookup (Top-Down): Match Source/Dest/Zone/App/User/Schedule
- Action: Allow / Deny / Drop / Reset / Redirect
- If Allow → Security Profiles: IPS, Antivirus, Anti-Spyware, URL Filtering, File Blocking, WildFire (Sandbox), SSL Decryption
- Egress Processing: NAT, QoS, Egress Interface
🎯 3 ฟังก์ชันหลักของ Firewall
- Access Control (Network Security Post): ควบคุมใครเข้าถึงอะไรได้บ้าง
- Threat Prevention: บล็อก Malware, Exploit, C2, Phishing, Data Exfiltration
- Visibility & Logging: Traffic Logs, Threat Logs, URL Logs, Data Filtering Logs → SIEM/SOAR
🛡️ Best Practices: การตั้งค่า Firewall ให้ปลอดภัย
- Default Deny (Implicit Deny): Block All → Allow Specific Only
- Least Privilege Rules: Specific Source/Dest/Port/App/User (No Any/Any)
- Rule Ordering: Specific Rules Top, Broad Rules Bottom, Cleanup Rule Last (Log All Denied)
- Enable Security Profiles: IPS, AV, URL Filtering, SSL Decrypt (Selective), DNS Security
- SSL Decryption (Selective): Decrypt Outbound (Exclude Finance/Health), Inbound (Own Certs)
- High Availability (HA): Active/Passive หรือ Active/Active + Config Sync
- Automated Rule Recertification: Review Unused/Shadowed/Expired Rules (Quarterly)
- Segment Admin Access: Management Interface บน Dedicated Mgmt Network + MFA + Jump Host
- Threat Intelligence Feeds: Auto-block Known Bad IPs/Domains/URLs
- Regular Pen Test / Firewall Audit: Annual External + Quarterly Internal
📊 Layer 3 vs Layer 4 vs Layer 7 Firewall
| Layer | OSI Layer | Inspects | Example |
| L3 | Network | IP Src/Dst, Routing | Router ACL, Basic Packet Filter |
| L4 | Transport | Port, Protocol, State (TCP Flags) | Stateful Firewall, Load Balancer |
| L7 | Application | App Signature, HTTP Host/URL, User, File, TLS SNI | NGFW, WAF, Proxy, ZTNA |
❓ คำถามพบบ่อย
- Firewall ป้องกันได้ทุกอย่างไหม?
- ไม่ ป้องกัน Insider Threat, Phishing Email (ต้อง Email Security), Compromised Credentials (ต้อง MFA/EDR), Zero-day (ต้อง Sandbox/Behavioral)
- Hardware vs Virtual vs Cloud FW เลือกตัวไหน?
| On-prem DC → Hardware/VM | Cloud Native → Cloud FW/FWaaS | Hybrid → Mix + Central Mgmt (Panorama, FortiManager, Strata) |
- ต้องการ SSL Decrypt ไหม?
| แนะนำให้ทำ (Selective) เพราะ >80% Traffic เป็น HTTPS ไม่ Decrypt = Blind Spot |