I want to forward the http traffic from an external server linnode to server in a private network which only allows outgoing connections using NAT. I am very new in this area, so I randomly tried socat and ssh tunnel but with no luck. One key problem here is I have no control of this private network, including firewall and gateway and therefore I cannot setup anything on gateway to redirect traffic from there.
I know how to setup a reverse ssh to that private server but that's a different thing. I don't know how would that help.
[add my try of ssh tunnel]
Let's see my linnode server is A with known ip. my private server is B and clearly with a unknown external ip address. The goal is to redirect traffic from A to B, so I run this in B:
ssh -N -f -R 8000:localhost:80 user@[A's ip]
This should built a tunnel from A:8000 to B:80. but when I use netcat
to check, no connection is been built on A.