Nginx http_user_agent 防護 ab 等

日誌出現大量:html

xxxxxxxxxxxxx - - [04/Jul/2013:23:37:49 +0800] "GET /1000.html HTTP/1.0" 200 56471 "-" "ApacheBench/2.3" -google

xxxxxxxxxxxxx - - [04/Jul/2013:23:37:49 +0800] "GET /1000.html HTTP/1.0" 200 56471 "-" "ApacheBench/2.3" -日誌

 

 

Nginx 設置..Nginx.conf 添加htm

 

 

       if ($http_user_agent ~ ApacheBench|WebBench|Jmeter|must-revalidate){get

       return 403;proxy_pass

       }date

 

重啓~Nginx 之後~~再查看日誌co

 

xxxxxxxxxxxxxx - - [05/Aug/2013:08:33:18 +0800] "GET / HTTP/1.0" 403 168 "-" "ApacheBench/2.3" -return

xxxxxxxxxxxxxx - - [05/Aug/2013:08:33:18 +0800] "GET / HTTP/1.0" 403 168 "-" "ApacheBench/2.3" -validate

 

 

若是 ... DDOS 的話....

 

=0=   查看特徵..... proxy_pass  http://www.google.com    打的死麼~~

相關文章
相關標籤/搜索