Re: Как прибить POST HTTP/1.1
Vladislav Shabanov
vlad.shabanov at gmail.com
Tue Jul 8 16:49:22 UTC 2014
Я сделал одну зону с ограничением на кол-во запросов в секунду для GET и другую для
POST. Второе ограничение, разумеется, жощщще.
От пионеров помогает.
set $binary_remote_addr_post "";
if ($request_method = POST) {
set $binary_remote_addr_post $binary_remote_addr;
}
limit_req_zone $binary_remote_addr zone=IPRATELIMIT:20m rate=20r/s;
limit_req_zone $binary_remote_addr_post zone=IPRATELIMIT_POST:20m rate=2r/s;
Влад
08 июля 2014 г., в 17:19, lisua <nginx-forum at nginx.us> написал(а):
> Как прибить ботов с помощью Nginx без парсинга логов:
>
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:37 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:37 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 177.55.241.91 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 177.55.241.91 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 37.45.201.168 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 2.134.162.100 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 197.162.13.111 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
> 93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"
> "-"
>
> Такое не помогло:
> if ($request_method = POST){
> return 499;
> }
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,251542,251542#msg-251542
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20140708/ac4c672d/attachment-0001.html>
Подробная информация о списке рассылки nginx-ru