Page 1 of 1

Reverse-proxy and x-forwarded-for

Posted: Sat Jan 01, 2022 10:13 am
by magic51

I have a HAproxy in front of a VRS-server (2.4.4 Windows). Working great, but an issue with the source-ip for the users, which shows as the ha-proxy IP instead of the users real IP. The HAproxy is on a different VLAN/subnet than the VRS-server (both on private IP:s) but is adding X-Forwarded-For headers.

In this post its mentioned ... 6884#p6884
However, I did have a look at the rules for determining the client's IP address when the request comes through a proxy - basically it's taken from the X-Forwarded-For header, but only if the proxy is on the LAN. If the request originates from a public internet address then X-Forward-For headers are ignored.
Its not quite clear in the response above, does the reverse-proxy has to be on a private IP or on the same subnet as the VRS-server? Is this still applicable on 2.4.4? Not sure which version was at the time of the comment in 2017.

Just so i know where to troubleshoot!