Im want to send traffic over to Host B on port 3000, i have access to all nodes in this drawing, the only port that is open between these two lans is port 80 from Linux Box B to Linux box A.
so i do a "ssh -R 1206:192.168.1.10:22 [email protected] -p 80
", and ssh back trough the tunnel with "ssh -L 3000:10.10.10.10:3000 disp@localhost -1206
"
if im correct this now listens to port 3000 on the Linux Box A and sends it to Linux Box B trough the tunnel to port 3000? are my logic correct?
how can i now route this traffic over to port 3000 on host B.
and if i want t two way connection "From B to A" how can this be done?
IMO your routing is/IP ranges are kind of weird but I guess that's not part of the problem.
I'm working a bit on guesses but I hope it's still of some help.
now if you send something from host_a to linux_box_a:3000 it actually gets sent to host_b:3000. For this to work the sshd on Linux Box A has to allow GatewayPorts and AllowTcpForwarding
for the other direction use
now Linux Box B listens on port 3000 an tunnels them to Host A port 3000.
With this solution though always the last part of the connection (between Host A and Linux Box A and on the other side Host B and Linux Box B) is not encrypted.
for an end to end encrypted tunnel you could use:
now each host (a&b) will have to use localhost:33000 as their sending destination.