Welcome! Log In Create A New Profile

Advanced

limit_req and IP white listing on 0.8.55

April 30, 2013 07:25PM
Hello!

I've followed this reference:

http://forum.nginx.org/read.php?2,228956,228961#msg-228961

To produce the following config:
http {
geo $public_vs_our_networks {
default 1;
127.0.0.1/32 0;
... my networks ...
}
map $public_vs_our_networks $limit_public {
1 $binary_remote_addr;
0 "";
}
limit_req_zone $limit_public zone=public_facing_network:10m rate=40r/m;
...
server {
...
location / {
...
limit_req zone=public_facing_network burst=5 nodelay;
...
proxy_pass http://my_upstream;
}
}
}

Unfortunately-- my error logs quickly filled up with clients who were incorrectly rate limited. It was as if this configuration created 1 bucket for ALL the public facing clients, as opposed to individually bucketing each public client by their $binary_remote_addr. Please advise on what I might be missing.

Thanks for your help!

-Nick
SubjectAuthorPosted

limit_req and IP white listing on 0.8.55

naugerApril 30, 2013 07:25PM

Re: limit_req and IP white listing on 0.8.55

Maxim DouninApril 30, 2013 08:14PM

Re: limit_req and IP white listing on 0.8.55

naugerMay 01, 2013 12:04AM

Re: limit_req and IP white listing on 0.8.55

Maxim DouninMay 01, 2013 01:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
Record Number of Users: 5 on December 17, 2014
Record Number of Guests: 180 on December 21, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready