Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

Firewall Configuration: Central Host, Architecture, และ Best Practices สำหรับองค์กร

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 แบบคลาสสิก

  1. Single Firewall (Single Point of Failure): Firewall ตัวเดียว ระหว่าง Internet และ Internal Network
  2. 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
  3. 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) เท่านั้น ไม่จำ StateACL on Router, Linux iptables/nftables (basic)
Stateful InspectionL3-L7จำสถานะ Connection (State Table) รู้ว่าคือ Traffic ตอบกลับหรือใหม่Check Point (Stateful Inspection), Cisco ASA, FortiGate, pfSense
Application-Level Gateway (Proxy Firewall)L7Terminate Connection, Inspect Payload, Re-originate - เข้าใจ Protocol/ApplicationBlue 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 + CloudPalo Alto, FortiGate, Check Point Quantum, Cisco Firepower

ขั้นตอนการ Configure Firewall (Best Practice)

  1. Secure Management Access: เปลี่ยน Default Credentials, Enable MFA, Restrict Management IP (Jump Host/Bastion), Use HTTPS/SSH Only, Disable HTTP/Telnet
  2. Define Network Zones/Interfaces: Untrust (Internet), DMZ, Trust (User), Server, Management, Guest, IoT, OT
  3. Create Address/Service Objects: กลุ่ม IP, Port, Application ให้มีชื่อหมายเลขชัดเจน (Naming Convention)
  4. Implement Default Deny Policy: Block All → Allow Specific (Whitelist Approach)
  5. 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)
  6. Enable Threat Prevention: IPS Profile, Anti-Virus, Anti-Spyware, File Blocking, URL Filtering, DNS Security, WildFire/ATP
  7. SSL/TLS Decryption: Decrypt Inbound (Web Server) + Outbound (User Traffic) - สำคัญมาก เพราะ 90%+ Traffic เป็น Encrypted
  8. High Availability (HA): Active/Passive หรือ Active/Active, Config Sync, Session Sync, Heartbeat
  9. Logging & Monitoring: Syslog → SIEM, SNMP Traps, Alerting, Retention Policy
  10. Change Management: Document, Approval, Test (Staging), Rollback Plan, Audit Trail
  11. Regular Audit & Rule Cleanup: Shadowed Rules, Unused Rules, Overly Permissive Rules (Quarterly)

Host-based Firewall vs Network-based Firewall

💡 Best Practice: ใช้ ทั้งคู่ (Defense in Depth) - Network Firewall ที่ Perimeter/Segment + Host Firewall บนทุก Endpoint/Server

Firewall Architecture Components

  • Control Plane: Management CPU, Config DB, Routing Table, HA State Sync
  • Data Plane (Forwarding Plane): Packet Processing (FPGA/ASIC/NPU), Session Table, App-ID Engine, IPS Engine, SSL Decrypt Engine
  • Management Plane: Web UI, CLI, API, REST, SNMP, NetConf/Yang
  • Log Plane: Log Generation, Forwarding (Syslog, API), Local Storage

ทำไม Firewall Configuration จึงสำคัญ?

  • Firewall ที่ Config ผิด = ช่องโหว่ใหญ่ที่สุด (Misconfiguration = #1 Cause of Breaches)
  • ป้องกัน Malware, Ransomware, C2, Data Exfil, Lateral Movement
  • Compliance Requirement (PCI DSS Req 1, ISO 27001 A.13.1, NIST 800-53 SC-7)
  • Visibility & Forensics (Logs = Evidence)
  • Business Continuity (HA, Failover)

Firewall Rule Design Principles

  1. Specificity: Specific Source/Dest/Port/App/User (No Any/Any/Any Allow)
  2. Ordering: Specific Rules ก่อน, General Rules ท้าย, Cleanup Rule (Deny All Log) ท้ายสุด
  3. Naming Convention: FW___ (e.g., FW_Trust_Internet_Web_001)
  4. Documentation: Description Field = Ticket Number, Owner, Business Justification, Expiry Date
  5. Expiration: Temporary Rules ต้องมีวันหมดอายุ (Auto-expire หรือ Review Reminder)
คุณสมบัติNetwork-based FirewallHost-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 PolicyDefense in Depth, Protect Host แม้ Network ถูก Bypass, Portable (Laptop)
จุดอ่อนSingle Point of Failure, Encrypted Traffic BlindspotManagement Overhead, User สามารถปิดได้ (ถ้าไม่ Lock Down)