DDoS Protection คืออะไร ป้องกันอย่างไร เว็บไซต์ของคุณต้องการไหม
DDoS Protection explained: what DDoS attacks are, how protection works, and what your website needs.
สารบัญ
DDoS Attack คืออะไร
DDoS (Distributed Denial of Service) คือการโจมตีที่ส่ง Traffic ปลอมจำนวนมหาศาลไปยังเซิร์ฟเวอร์เป้าหมาย ทำให้เซิร์ฟเวอร์รับไม่ไหวและล่มลง การโจมตีมาจากหลายแหล่งพร้อมกัน (Botnet) ทำให้บล็อกยากกว่า DoS ธรรมดา
DDoS (Distributed Denial of Service) attacks flood target servers with massive fake traffic, overwhelming them into failure. Attacks come from multiple sources simultaneously (botnet), making them harder to block than simple DoS attacks.
- Botnet: เครือข่าย Bot พันถึงล้านตัว
- Traffic Flood: ส่ง Request หลายล้านครั้ง/วินาที
- เป้าหมาย: ทำให้ Server ล่ม ผู้ใช้จริงเข้าไม่ได้
- DDoS vs DoS: Distributed = หลายแหล่ง ป้องกันยากกว่า
- ใครเสี่ยง: เว็บดัง, E-commerce, Government, Game
ประเภทของ DDoS Attack
L3/L4 (Network/Transport Layer): Volume-based เช่น UDP Flood, SYN Flood ส่ง Packet เยอะมาก L7 (Application Layer): HTTP Flood ที่ Request ซับซ้อนกว่า ตรวจจับยากกว่า L3/L4 เพราะ Request ดูเหมือน Traffic ปกติ
L3/L4 (Network/Transport Layer): Volume-based attacks like UDP Flood, SYN Flood sending massive packets. L7 (Application Layer): HTTP Flood with complex requests, harder to detect than L3/L4 because requests appear as normal traffic.
- L3 UDP Flood: ส่ง UDP Packet ใหญ่มาก
- L4 SYN Flood: ส่ง SYN ไม่ ACK ทำ Server จม
- L7 HTTP Flood: Request ซ้ำๆ จาก Browser จริง
- DNS Amplification: ขยาย Traffic ผ่าน DNS
- Slowloris: เปิด Connection ค้างไว้ ไม่ส่งข้อมูล
ความเสียหายที่เกิดจาก DDoS
DDoS ทำให้เว็บล่ม รายได้หยุดชะงัก ลูกค้าเข้าไม่ได้ ชื่อเสียงเสียหาย ค่า Bandwidth สูงผิดปกติ (บาง Provider ชาร์จ Overage) และอาจถูกใช้เป็น Diversion ขณะโจมตีจริงใน Layer อื่น
DDoS causes website downtime, halted revenue, blocked customers, reputation damage, abnormal bandwidth charges (some providers bill overages), and may serve as a diversion while the real attack targets another layer.
- เว็บล่ม: ลูกค้าเข้าไม่ได้ รายได้หยุด
- Bandwidth สูง: โดนชาร์จ Overage
- ชื่อเสียง: ลูกค้าไม่เชื่อถือ
- Diversion: DDoS คลุมการโจมตีจริง
- Recovery Time: กว่าจะกลับมาปกติ อาจหลายชั่วโมง
Cloudflare ป้องกัน DDoS อย่างไร
Cloudflare มีระบบ DDoS Mitigation ที่ตรวจจับและกรอง Attack Traffic ที่ Edge Network 310+ เมือง โดยอัตโนมัติ Free Plan ป้องกัน L3/L4 Attack ได้ไม่จำกัด ขนาด Pro/Business เพิ่ม L7 WAF ที่ครอบคลุมกว่า และ Advanced DDoS Mitigation
Cloudflare's DDoS Mitigation automatically detects and filters attack traffic at its 310+ city edge network. The Free plan protects against unlimited L3/L4 attacks. Pro/Business plans add more comprehensive L7 WAF and Advanced DDoS Mitigation.
- Free Plan: L3/L4 DDoS ไม่จำกัด ขนาด
- Under Attack Mode: เปิดได้เมื่อโดน DDoS
- Challenge Page: กรอง Bot ก่อนเข้าเว็บ
- WAF Pro/Business: L7 Application Layer
- Scrubbing Center: กรอง Traffic ที่ 310+ เมือง
Hosting ที่มี DDoS Protection
Hosting ที่มีคุณภาพหลายเจ้ามี DDoS Protection ในตัว แต่ Level ต่างกัน Basic DDoS Protection ส่วนใหญ่คือ L3/L4 ถ้าต้องการ L7 Protection ที่ครอบคลุมกว่า ควรใช้ Cloudflare ร่วมด้วย VPS Provider บาง เจ้าเช่น OVH มี DDoS Protection ขั้นสูง
Quality hosting providers include DDoS protection, but levels vary. Basic protection usually covers L3/L4. For more comprehensive L7 protection, use Cloudflare alongside. Some VPS providers like OVH include advanced DDoS protection.
- Hosting ทั่วไป: L3/L4 Basic Protection
- OVH: DDoS Protection ขั้นสูงรวมอยู่
- Cloudflare + Hosting: ป้องกันครอบคลุมสุด
- Network-level Protection: ISP Upstream Filtering
- แนะนำ: ใช้ Cloudflare ฟรีร่วมกับ Hosting ทุกเจ้า
Defense in Layers (Defense in Depth)
การป้องกัน DDoS ที่ดีต้องมีหลาย Layer: 1. CDN/Proxy (Cloudflare) กรอง Traffic ก่อน 2. Hosting Provider DDoS Protection 3. Firewall บน Server (iptables/nftables) 4. Rate Limiting บน Web Server 5. Application-level Validation
Effective DDoS protection requires multiple layers: 1. CDN/Proxy (Cloudflare) filters traffic first 2. Hosting provider DDoS protection 3. Server firewall (iptables/nftables) 4. Web server rate limiting 5. Application-level validation.
- Layer 1: Cloudflare Edge กรอง Attack
- Layer 2: Hosting DDoS Protection
- Layer 3: Server Firewall (iptables)
- Layer 4: Web Server Rate Limiting
- Layer 5: Application Validation + CAPTCHA
Rate Limiting ป้องกัน L7 DDoS
Rate Limiting จำกัดจำนวน Request ต่อ IP ต่อหน่วยเวลา เช่น 100 Request/นาที ถ้าเกินจะ Block หรือ Challenge ด้วย CAPTCHA ช่วยป้องกัน L7 HTTP Flood ที่ Cloudflare WAF ฟรีไม่รวม แต่มีใน Pro Plan หรือทำเองบน Nginx
Rate Limiting restricts requests per IP per time period — e.g., 100 requests/minute; if exceeded, block or challenge with CAPTCHA. Protects against L7 HTTP Flood. Not included in Cloudflare WAF free plan, but available in Pro plan or configurable directly on Nginx.
- Rate Limit: 100 Request/นาทีต่อ IP
- เกิน Limit: Block หรือ Challenge (CAPTCHA)
- Cloudflare Pro: Rate Limiting ใน WAF Rules
- Nginx: limit_req_zone สำหรับ Rate Limit
- Login Page: Rate Limit เป็นพิเศษ (5 Request/นาที)
CDN ช่วยป้องกัน DDoS อย่างไร
CDN ซ่อน IP จริงของ Origin Server ทำให้ Attacker โจมตี CDN Edge แทน ซึ่ง CDN มี Capacity สูงกว่ามาก และมีระบบ Scrubbing Traffic กรอง Attack ออก Cloudflare ซ่อน Origin IP ด้วย Orange Cloud Mode
CDN hides the real origin server IP, making attackers target CDN edges instead. CDN edges have much greater capacity and include traffic scrubbing systems to filter attacks. Cloudflare hides origin IP through Orange Cloud Mode.
- ซ่อน Origin IP: Attacker ไม่รู้ IP จริง
- Capacity สูง: Cloudflare รับ Traffic หลาย Tbps
- Anycast: กระจาย Traffic ไปทั่วโลก
- Scrubbing: กรอง Attack ที่ Edge
- Orange Cloud: ต้องเปิดเพื่อซ่อน Origin IP
ค่าใช้จ่ายในการป้องกัน DDoS
Cloudflare Free: DDoS L3/L4 ฟรีไม่จำกัด ขนาด เพียงพอสำหรับเว็บส่วนใหญ่ Cloudflare Pro $20/เดือน: เพิ่ม L7 WAF และ Advanced Rules Enterprise DDoS Mitigation: $1,000+/เดือน สำหรับ Business ขนาดใหญ่
Cloudflare Free: unlimited L3/L4 DDoS — sufficient for most websites. Cloudflare Pro $20/month: adds L7 WAF and Advanced Rules. Enterprise DDoS Mitigation: $1,000+/month for large businesses.
- Cloudflare Free: L3/L4 ฟรี เพียงพอสำหรับส่วนใหญ่
- Cloudflare Pro $20/เดือน: L7 WAF
- Cloudflare Business $200/เดือน: Custom Rules
- AWS Shield Standard: ฟรีสำหรับ AWS Customer
- AWS Shield Advanced: $3,000/เดือน Enterprise