preserve client source address when proxying to upstream

Vsevolod Petrov v.d.petrov at gmail.com
Wed Dec 16 15:56:02 UTC 2015


Hello,

proxy_bind directive allows to specify source IP address for proxied
connections.
This directive can be set to local IP address.

I'm wondering if there's a way to set $remote_addr as proxy_bind address?
Or any other non-local IP address?

The idea is to see original client source IP address at the server site.
While it's not http traffic I cannot use XFF header.

Destination MAC address in the response packet from the server is set to
nginx server interface address. So, there's no problem at layer 2
communication.

Can nginx listen for responses coming to non-local destination address?

Thanks in advance!

--
Vsevolod Petrov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151216/157f9052/attachment.html>


More information about the nginx mailing list