Welcome! Log In Create A New Profile

Advanced

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

Maxim Dounin
July 03, 2017 09:10AM
Hello!

On Mon, Jul 03, 2017 at 04:57:31AM -0400, foxgab wrote:

> Thinks for you reply.
> i got a problem on http_realip_module, as what you said, duplicate addresses
> occurred in that header.
> if i want to get the real ip for access limiting, and append the last hop
> proxy address in X-Forwarded-Fro header at the same time, what should i do?

There are two basic options:

1. Avoid using the realip module. You can still do access checks
using the "if" directive - and, for example, appropriate geo
blocks.

2. Avoid using $proxy_add_x_forwarded_for. You may add the
original address yourself, using the $realip_remote_addr variable
and appropriate map{} blocks.

Alternatively, you may want to rethink your setup to simply avoid
one or the another.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

set_real_ip_from,real_ip_header directive in ngx_http_realip_module

Nishikubo Minoru February 27, 2017 08:00PM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

Maxim Dounin February 28, 2017 08:42AM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

Nishikubo Minoru February 28, 2017 07:58PM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

foxgab June 29, 2017 09:08AM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

Maxim Dounin June 29, 2017 11:34AM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

foxgab July 03, 2017 04:57AM

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

Maxim Dounin July 03, 2017 09:10AM

Re: set_real_ip_from,real_ip_header directive in ngx_http_realip_module

mohitmehral March 23, 2017 01:45AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
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