How to configure a remote SSH tunnel to preserve the source ip

How to configure a remote SSH tunnel to preserve the source ip

I have a server behind a NAT, and I am using a reverse SSH tunnel to access it from the internet. (I do not have any control over the NAT)

I am using these settings:

autossh -f -M 37650 -N -R 8080:localhost:80 -o "ProxyCommand=nc -X connect -x proxy.example.com:3128 %h %p" [email protected]

(I have also set GatewayPorts yes)

The tunnel works, but it hides the source address of the connection (I see all HTTP requests coming from localhost).

How can I fix this? (I have root access on both servers)

相关内容