Imagine I have multiple (debian) servers in different locations which are not connected via LAN.
I need to find a way to forward specific ports to one of the other servers but the server which handles the request should see the original IP of the user who connected to the forwarding server. I know there is X-Forwarded-For for HTTP, but I am interested in TCP in general.
It's also possible to setup a VPN (openvpn, PPTP, ...), I don't know if this helps but the problem with VPN is that then all cross-server connections will go through the VPN host but it would be better if every server can forward traffic directly to another one.
server1:80 => server2:80
server2:8080 => server3:8080
server3:1234 => server1:1234
I tried SSH-forwarding but the original IP gets lost.