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

Firewall ในความปลอดภัยเครือข่ายคืออะไร? ประเภทและหลักการทำงาน

Firewall คืออะไร?

Firewall เป็นระบบความปลอดภัย (Hardware หรือ Software) ที่ Monitor และ Filter Traffic เข้า-ออก ตาม Security Policies ขององค์กร ทำหน้าที่เป็น "กำแพงกั้น" ระหว่าง Private Network (Trusted) และ Public Internet (Untrusted)

3 ประเภท Firewall หลัก (Traditional Classification)

  1. Packet Filtering Firewall: ตรวจสอบ Header (Source/Dest IP, Port, Protocol) ตาม Rule Set ไม่ดู Payload/State
  2. Stateful Inspection Firewall: ติดตาม State ของ Connection (TCP Handshake) รู้ว่ Packet นี้เป็นส่วนของ Connection ที่ Established แล้วหรือไม่
  3. 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 3Packet Filterดู IP/Port/Protocol (Stateless)
Layer 4Stateful Firewallดู TCP/UDP Session State
Layer 7Application/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

  1. Default Deny (Block All, Allow Only Needed)
  2. Least Privilege Rules
  3. Regular Rule Review & Cleanup (Remove Unused/Shadowed Rules)
  4. Enable Logging & Send to SIEM
  5. Firmware/Signature Updates ทุกวัน
  6. HA (High Availability) สำหรับ Production
  7. 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