Skip to content

How to surf the Intranet (local network sites) using ssh

May 11, 2009

If the company you work for has restrictions that allow visiting certain company websites only from within the company, you can bypass this restriction using ssh access.

From your local machine, connect to the ssh server of your company and add a few options, like this:

ssh -C2qTnN -D 8090 username@servername

This command will not finish, this is expected and desired. The port (in my case 8090) can be any port you want (but over 1024 if you are not root).

You have created a ssh tunnel that ca be used to tunnel the web browser traffic, so that you can see the sites that are visible from you ssh server. To do this using Firefox, go to Preferences->Advanced->Network. The window will look like the image below.

Firefox Network Options window.

Firefox Network Options window.

Click on the “Settings” button and a configuration screen will pop up. Complete it like in the following screenshot.

Firefox Connections Settings Window. Here we direct the browser to use the ssh tunnel we created.

Firefox Connections Settings Window. Here we direct the browser to use the ssh tunnel we created.

This is all you need to do,  you can now surf on local sites from the internet by entering the url you want in the URL bar in Firefox. Don’t forget to set “no proxy” option in the same configuration screen when you want to close the ssh window.

Using ssh tunnels is also helpful if you are on a network that you don’t trust and use websites that do not have strong cryptography. SSH traffic is encrypted and as such, the security risk will be less.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: