Thanks for your help Maxim and António. It works now. I'll correct the ifevil tomorrow. Just another question, can you please tell me which value should I use for the rate and burst? Actually, I use: limit_req_zone $binary_remote_addr zone=ratezone:20m rate=30r/s; limit_req zone=ratezone burst=100 nodelay; There's almost more then 20k domains behind it and a lot of cby LeMaitre - Nginx Mailing List - English
Hello Maxim, I have tried and I got error 403. http { ... geo $nolimit { default 0; 10.0.0.0/24 1; # my network 192.168.0/24 1; #my network } limit_req_zone $binary_remote_addr zone=ratezone:10m rate=5r/s; ... server { location / { error_page 418 = @nolimit; if ($nolimit) { return 418; } limit_req zone=ratezone burst=10 nodelay; index.htmlby LeMaitre - Nginx Mailing List - English
Hi folks, 1) I want to use limit_req with whitelisting some subnet, I have seen this post: http://forum.nginx.org/read.php?21,200815,200815#msg-200815 and done some test but it's not working. I have added to server context: geo $rate { default 5; # 5r/s 10.0.0.0/24 -; 192.168.0.0/24 -; 10.1.0.0 -; } limit_req_zone $binary_remote_addr zone=ratezone:10m rate=$rate; limit_req zby LeMaitre - Nginx Mailing List - English