Whitelisting IP addresses for ratelimiting

James Fidell james at cloud9.co.uk
Wed Jul 25 12:56:29 UTC 2012


On 25/07/12 13:53, James Fidell wrote:
> I have my configuration set up based on the information at
> http://gadelkareem.com/2012/03/25/limit-requests-per-ip-on-nginx-using-httplimitzonemodule-and-httplimitreqmodule-except-whitelist/
>
> as follows:
>
> http {
> ...
>    geo $unlimited {
>      default 1;
>      192.168.45.56/32 0;
>    }
> ...
>    limit_req_zone  $binary_remote_addr  zone=unlimited:10m   rate=10r/m;
> ...
>    server {
>    ...
>      location / {
>        limit_req zone=unlimited burst=5;
>      }
>    }
> }

I realise it may be much clearer if I did s/unlimited/limited/ on this 
config file :)

James



More information about the nginx mailing list