<html><head><meta http-equiv="Content-Type" content="text/html charset=koi8-r"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Я сделал одну зону с ограничением на кол-во запросов в секунду для GET и другую для<div>POST. Второе ограничение, разумеется, жощщще.</div><div><br></div><div>От пионеров помогает.</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> set $binary_remote_addr_post "";</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> if ($request_method = POST) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> set $binary_remote_addr_post $binary_remote_addr;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> }</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><div style="margin: 0px;"><div style="margin: 0px;"> limit_req_zone $binary_remote_addr zone=IPRATELIMIT:20m rate=20r/s;</div><div style="margin: 0px; min-height: 13px;"> limit_req_zone $binary_remote_addr_post zone=IPRATELIMIT_POST:20m rate=2r/s;</div></div></div><div><div><br></div><div>Влад</div><div><br><div><div>08 июля 2014 г., в 17:19, lisua <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> написал(а):</div><br class="Apple-interchange-newline"><blockquote type="cite">Как прибить ботов с помощью Nginx без парсинга логов:<br><br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:34 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:35 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:36 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:37 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:37 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>177.55.241.91 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>177.55.241.91 - - [08/Jul/2014:14:54:38 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:39 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.105.91 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>37.45.201.168 - - [08/Jul/2014:14:54:40 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>2.134.162.100 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>197.162.13.111 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br>93.77.24.242 - - [08/Jul/2014:14:54:41 +0200] "POST HTTP/1.1" 400 166 "-"<br>"-"<br><br>Такое не помогло:<br>if ($request_method = POST){<br>return 499;<br>}<br><br>Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?21,251542,251542#msg-251542">http://forum.nginx.org/read.php?21,251542,251542#msg-251542</a><br><br>_______________________________________________<br>nginx-ru mailing list<br><a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>http://mailman.nginx.org/mailman/listinfo/nginx-ru</blockquote></div><br></div></div></body></html>