Welcome! Log In Create A New Profile

Advanced

Problem with nginx rate limiting not working when using white listing

June 29, 2020 04:43AM
I have nginx rate-limiting working when using the following

limit_req_zone $binary_remote_addr zone=mylimit:20m rate=50r/m;

I now want to apply it to certain IPs so i've changed it to

geo $limit {
default 1;
1.2.3.4/32 0;
}

map $limit $mylimit {
0 "";
1 $binary_remote_addr;
}

limit_req_zone $my_limit zone=mylimit:20m rate=50r/m;

Following the example here https://www.nginx.com/blog/rate-limiting-nginx/

But the rate limit is ignored even when coming from a different IP than the one in the config

This is using nginx version: nginx/1.14.0 (Ubuntu)

In the server block I have

limit_req zone=mylimit burst=15 nodelay;

which was working before
Subject Author Posted

Problem with nginx rate limiting not working when using white listing

stu_cambridge June 29, 2020 04:43AM

Re: Problem with nginx rate limiting not working when using white listing

J.R. June 29, 2020 10:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 188
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready