Q:

What is the best way to create remote tunnel?

I have 3 Linux servers:
- 10.0.0.0/24 - (10.0.0.10) Linux server inside my LAN.
- 20.0.0.0/24 - (20.0.0.10) Linux server with HTTP Apache server
- 50.50.50.50/32 - Server on Amazon AWS which see both 10.x and 20.x LANs.
10.x cannot see 20.x and 20.x cannot see 10.x
What is the best way (and how can I do it) to se 50.50.50.50 server on AWS to create tunnel from 10.x to 20.x  
For example, if 20.x runs HTTPd, I want to be able to go to 50.50.50.50:80 from 10.x servers and see 20.x:80 content .
Thanks.

A:

Login to 50.50.50.50 and run
ssh -L 50.50.50.50:80:20.x:80 username@20.x

and enter your password for user@20.x.
Now, if you connect to 50.50.50.50:80 from 10.x you should see the HTTPd on 20.x.
You can add a -N to not execute a remote command. 
Add a -f -N to background the ssh process.
cheers,

