IP-Range in Limit-Moduls

Maxim Dounin mdounin at mdounin.ru
Thu Oct 22 18:50:00 MSD 2009


Hello!

On Thu, Oct 22, 2009 at 10:19:34AM -0400, double wrote:

> Hello,
> 
> Is there a chance to set an IP-Range with the "HTTP Limit Zone"
> or the  "HTTP Limit Requests" module?
> Like 1.2.3.4/8   -> ignore the last 8 bits of the internet address.
> 
> It would reduce the required zone-size and would help against
> DDoS attacks.

You are free to use any variable in limit_zone/limit_req_zone.  It 
should be possible to produce needed variable with rewrite module 
(or alternatively via embedded perl).

Maxim Dounin





More information about the nginx mailing list