Welcome! Log In Create A New Profile

Advanced

nginx directives geo and map behind proxy

March 12, 2019 06:22AM
We have a problem with mapping ip's on our nginx loadbalancer behind myracloud (proxy). In configuration file we have:


set_real_ip_from x.x.x.x
...
real_ip_header CF-Connecting-IP;
real_ip_recursive on;


In addition to map ip's:


geo $limited {
default 0;
x.x.x.x 1;
}

map $limited $botlimit {
0 $remote_addr;
1 '';
}


We want to limit requests with limit_req_zone in gninx. Using it directly connected to the loadbalancer is fine. It works great, but connections coming from myracloud are not limited. Guess nginx is evaluating ip address before extracting real client ip from proxy. So, is there a way to solve the problem?
Subject Author Posted

nginx directives geo and map behind proxy

gogan March 12, 2019 06:22AM

Re: nginx directives geo and map behind proxy

Francis Daly March 14, 2019 02:34PM

Re: nginx directives geo and map behind proxy

gogan March 15, 2019 10:34AM

Re: nginx directives geo and map behind proxy

Francis Daly March 16, 2019 05:34AM

Re: nginx directives geo and map behind proxy

gogan March 18, 2019 09:49AM

Re: nginx directives geo and map behind proxy

Francis Daly March 21, 2019 07:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready