Firewall Configuration ใน Network Security คืออะไร?
Firewall Configuration คือการตั้งค่ากฎกติกา (Rules/Policies) บน Firewall เพื่อควบคุมการไหลของ Traffic ระหว่าง Network Zones ต่างๆ ตามหลักการ Least Privilege และ Default Deny รวมถึงการกำหนด Network Profiles (Domain, Private, Public), Logging, NAT, VPN, High Availability, และ Integration กับระบบอื่นๆ
Central Host ใน Firewall Architecture (Typical Configuration)
ในสถาปัตยกรรม Firewall แบบดั้งเดิม (Traditional Perimeter Firewall) "Central Host" มักหมายถึง Firewall Appliance/Cluster เอง ที่วางอยู่ที่ Network Perimeter (Edge) ทำหน้าที่เป็น Choke Point จุดควบคุมกลางที่ Traffic ทุกอย่างต้องผ่าน
โมเดลการติดตั้ง Firewall แบบคลาสสิก
- Single Firewall (Single Point of Failure): Firewall ตัวเดียว ระหว่าง Internet และ Internal Network
- Dual Firewall (DMZ Architecture):
- External Firewall: Internet ↔ DMZ (Web, Mail, DNS Servers)
- Internal Firewall: DMZ ↔ Internal Network (App, DB, User)
- Central Host ในบริบทนี้ = Internal Firewall ที่ปกป้อง Core Network
- Three-Legged Firewall (Single Box, 3 Interfaces): Outside, DMZ, Inside บน Hardware เดียว (Logical Separation)
สถาปัตยกรรมสมัยใหม่ (Modern Architecture) - ไม่มี Central Host เดียวแล้ว
- Distributed Firewalling / Micro-segmentation: Firewall Agent/Module บน Hypervisor/Host (VMware NSX, Cisco ACI, Illumio, Guardicore) - Every Host เป็น Firewall
- Zero Trust / ZTNA: ไม่มี Perimeter แล้ว Policy Enforcement Point (PEP) กระจายอยู่ทุกที่ (Identity Provider, Proxy, Agent)
- Cloud-Native Firewall: AWS Network Firewall, Azure Firewall, GCP Firewall, Cloudflare WAF - Managed Service
- SASE/SSE: Firewall-as-a-Service ใน Cloud Edge (Zscaler, Netskope, Cato, Prisma Access)
3 ประเภท Firewall หลัก (Three Firewall Configurations/Types)
| ประเภท | ทำงานที่ Layer | ลักษณะ | ตัวอย่าง |
|---|---|---|---|
| Packet Filtering (Stateless) | L3/L4 | ตรวจสอบ Header (IP, Port, Protocol) เท่านั้น ไม่จำ State | ACL on Router, Linux iptables/nftables (basic) |
| Stateful Inspection | L3-L7 | จำสถานะ Connection (State Table) รู้ว่าคือ Traffic ตอบกลับหรือใหม่ | Check Point (Stateful Inspection), Cisco ASA, FortiGate, pfSense |
| Application-Level Gateway (Proxy Firewall) | L7 | Terminate Connection, Inspect Payload, Re-originate - เข้าใจ Protocol/Application | Blue Coat Proxy, F5 ASM, Microsoft ISA/TMG (Legacy), WAF |
| Next-Generation Firewall (NGFW) | L3-L7 | รวม Stateful + App-ID + User-ID + IPS + SSL Decrypt + Threat Intel + Cloud | Palo Alto, FortiGate, Check Point Quantum, Cisco Firepower |
ขั้นตอนการ Configure Firewall (Best Practice)
- Secure Management Access: เปลี่ยน Default Credentials, Enable MFA, Restrict Management IP (Jump Host/Bastion), Use HTTPS/SSH Only, Disable HTTP/Telnet
- Define Network Zones/Interfaces: Untrust (Internet), DMZ, Trust (User), Server, Management, Guest, IoT, OT
- Create Address/Service Objects: กลุ่ม IP, Port, Application ให้มีชื่อหมายเลขชัดเจน (Naming Convention)
- Implement Default Deny Policy: Block All → Allow Specific (Whitelist Approach)
- Configure Allow Rules (Top-Down Processing):
- Management Access (Specific IPs Only)
- Critical Services (DNS, NTP, Updates)
- Business Applications (Explicit App/Port/User)
- Internet Access (User Groups, URL Filtering, SSL Decrypt)
- Enable Threat Prevention: IPS Profile, Anti-Virus, Anti-Spyware, File Blocking, URL Filtering, DNS Security, WildFire/ATP
- SSL/TLS Decryption: Decrypt Inbound (Web Server) + Outbound (User Traffic) - สำคัญมาก เพราะ 90%+ Traffic เป็น Encrypted
- High Availability (HA): Active/Passive หรือ Active/Active, Config Sync, Session Sync, Heartbeat
- Logging & Monitoring: Syslog → SIEM, SNMP Traps, Alerting, Retention Policy
- Change Management: Document, Approval, Test (Staging), Rollback Plan, Audit Trail
- Regular Audit & Rule Cleanup: Shadowed Rules, Unused Rules, Overly Permissive Rules (Quarterly)
Host-based Firewall vs Network-based Firewall
| คุณสมบัติ | Network-based Firewall | Host-based Firewall |
|---|---|---|
| ตำแหน่ง | Network Perimeter / Segment Boundary | บน Host/Endpoint เอง (Windows Firewall, iptables, nftables, Windows Defender Firewall) |
| ขอบเขตคุ้มครอง | Network Segment ทั้งหมด | Host เดียวเท่านั้น |
| Visibility | เห็น Traffic ระหว่าง Hosts (North-South, East-West) | เห็น Traffic เข้า/ออก Host นั้นๆ เท่านั้น |
| การจัดการ | Centralized (Policy Push) | Distributed (GPO, Intune, Ansible, Chef, Puppet) |
| จุดแข็ง | Choke Point, High Throughput, Central Policy | Defense in Depth, Protect Host แม้ Network ถูก Bypass, Portable (Laptop) |
| จุดอ่อน | Single Point of Failure, Encrypted Traffic Blindspot | Management Overhead, User สามารถปิดได้ (ถ้าไม่ Lock Down) |