May 2, 2012

Reverse SSH Tunneling OR "Poor mans VPN"

In corporate networks , the servers will be placed behind a NAT for security reasons. Its not possible to access the server behind the NAT from outside network. And here comes a way to access servers behind NAT through SSH , its called Reverse SSH Tunneling OR Poor Mans VPN.

Scenario.

IP Address of the Server you need to access 192.168.20.55
IP Address of the Client from which you are trying 150.57.9.9


1. SSH from the destination to the source (with public ip) using command below:


ssh -R 2080:localhost:22 sourceuser@150.57.9.9

2. Now you can SSH from source to destination through SSH tuneling:

ssh localhost -p 19999


1 comment:

Alan Wade said...

SSH tunnels offer a method to bypass firewalls that command sure web services – farewell as a website permits outgoing connections. As an example, at workplace users is also blocked by some firewalls to access to social websites like facebook and youtube directly through eighty ports. However users might not would like to possess their internet traffic blocked by the firewalls and filters and want to be ready to unblock facebook and youtube. If users will hook up with AN external SSH server, they will produce AN SSH tunnel to forward a given port on their native machine to port eighty on an overseas internet server to bypass those firewalls and filters to unblock facebook and youtube.

SSH VPN Info