Welcome! Log In Create A New Profile

Advanced

Re: realip and remote_port

Maxim Dounin
February 25, 2017 06:18PM
Hello!

On Wed, Feb 22, 2017 at 04:58:50PM -0500, xxdesmus wrote:

> I can confirm I see the same thing.
>
> If you use set_real_ip_from, real_ip_header, etc then it wipes out the
> $server_port value.

The $server_port variable is not expected to be changed by the
realip module. If you see it changed - you may want to provide
more details.

The original question you are answering to, as asked two years
ago, was about $remote_port. The $remote_port is somewhat
expected to be cleared as long as the address of the client as
seen in the header configured only contains the address itself,
and not the port. And this is usually the case. Starting with
nginx 1.11.0, the realip module is able to recognize and use
addresses with ports from the header, see CHANGES:

*) Feature: the ngx_http_realip_module is now able to set the client
port in addition to the address.

But it is not something usually configured and/or available from
normal proxies in the X-Forwarded-For header.

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

realip and remote_port

Frank Liu September 19, 2015 06:42AM

Re: realip and remote_port

xxdesmus February 22, 2017 04:58PM

Re: realip and remote_port

Maxim Dounin February 25, 2017 06:18PM

Re: realip and remote_port

xxdesmus February 26, 2017 12:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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