Technical questionAccepted answer
SSH Tunnel - Performant alternatives for exposing a local port to remote machines?
dada513
May 22
0 views1
I have Server A running at home in a Carrier-Grade NAT environment. Due to this I cannot open a port directly in my router. I also have Server B on a cloud hosting provider, which has a static public IP address that can have ports opened to. Both machines run Ubuntu linux.
So far the best solution for me was SSH Tunneling, but it comes with a performance drawback known as TCP-over-TCP.
I have tried several solutions and each one of them had some problems:
- OpenVPN/Wireguard: I do not want to route Server A's entire traffic to a remote server, only expose a few ports (while keeping them accessible from the LAN, too)
- ngrok: Centralised service, has several limitations (like max connections, etc)
- LocalTunnel: HTTP(S) only. I want to forward TCP traffic.
- SSH Tunnel: discussed above
- Most other solutions: Centralised (non-selfhostable) or HTTP(S) only
I also need the original IP address of the client accessing the port through Server B to be visible to Server A. What software should I try?
1 answer
3 question comments
Use comments to ask for clarification. Post a solution as an answer.
dada513Permalink
May 22
@HåkanLindqvist isn't that the same as SSH Tunneling?
Håkan LindqvistPermalink
May 22
Ssh has options for forwarding in both directions (see
-R as well as -L in the ssh options). I don't think your requirements rule out that as a possibility?