Tuesday, 5 May 2015

Access Blocked Website using SSH tunnel

Consider the following scenario:

Client:          client.mycompany.com
Proxy:           proxy.outsider.com
Web Server: www.xxx.com

Suppose a user 'Shabbir' on 'client.mycompany.com' wants to access the website 'www.xxx.com'. But the company's firewall is blocking access to this website.

But Shabbir has SSH access to a machine 'proxy.outsider.com'. Shabbir will access the website through an SSH connection with 'proxy.outsider.com'

Shabbir will execute the following command on 'client.mycompany.com'

[shabbir@client ~]$ ssh -L 8080:www.xxx.com:80 shabbir@proxy.outsider.com

Shabbir can now access the website on port '8080' on his local machine by typing the following URL in his browser.

Local Port '8080' on 'client.mycompany.com' is connected to port '80' on 'www.xxx.com' through 'proxy.outsider.com'

The connection between 'client.mycompany.com' and 'proxy.outsider.com' is an encrypted ssh connection.

And the connection between 'proxy.outsider.com' and 'www.xxx.com' is an unencrypted http session.

client        <------------------------------------>  proxy  <--------------------------->   www.xxx.com
Port:8080    encrypted ssh session                           unencrypted session     Port 80     

Since the ssh session is encrypted, the website access through it cannot be detected by the company firewall.

1 comment:

  1. Proxy sites help us in a lot of ways in our online time. The mainly significant is that a proxy site helps us to unblock or most favorite social site.  
    Professional Adviser