Monday, March 31, 2014

Haproxy 1.5 Protect Web Server Chống lại Slowloric DOS Attack

Slowloric là gì???
Slowloric là một script mở kết nối TCP và gửi HTTP request header rất chậm đến web server để giữ kết kết.
slowloris attack
Như hình trên, Slowloric Attack gửi HTTP request header không đầy đủ đến web server. Làm server chờ đợi HTPP request đầy đủ và normal user chờ đợi HTTP relay của server. do đó. Normal user bị lỗi 503 service unavailable. Slowloric là attack ở layer 7.

Configuration
defaults
  mode http
  maxconn 19500
  timeout client 60s  
  timeout server 60s
  timeout queue 60s
  timeout connect 4s
  timeout http-request 5s
  option httpclose
  option abortonclose
  balance roundrobin
  option forwardfor #  Biết client's IP trong X-Forwarded-For.
  retries 2
frontend www
  bind :80
  default_backend apache
backend app
  server app1 192.168.1.2:8080 maxconn 1000

No comments:

Post a Comment