Home > Linux > SSH Tunnel Using Putty for Firefox or Chrome

SSH Tunnel Using Putty for Firefox or Chrome


For the purposes of this example let’s assume we are connecting to a site named “myremotesshserver.com”.

When you start Putty you should see a window that looks like the next figure:

Initial Putty session configuration window

Start Putty, and we’ll create a new session configuration that will serve as your tunnel. In the field labeled “Host Name (or IP address)”, enter the hostname or TCP/IP address of your remote server. For the purposes of this tutorial my fictitious hostname will be myremotesshserver.com, so I enter that name in the Host Name field.

In the textfield labeled “Saved Sessions”, enter a name that you want to use to identify this configuration. This is typically the hostname or IP address of your remote server, but it can also be something like “SSH tunnel”. In my case I’m just going to put my hostname here, i.e., myremotesshserver.com.

At this point your Putty window should look like the following figure:

Putty session configuration window with initial fields populated

Next, on the left side of the putty window there is a navigation tree. In that tree you want to select the Tunnels item. If this item isn’t already visible, you can find it by clicking the Connection node in the tree, then SSH, and then Tunnels. This is shown in the next figure:

Putty Tunnel menu item selected

Under the section labeled “Add a new forwarded port” type in a port like 5150 (my personal tribute to Van Halen) for the source port. Leave the Destination field blank, then select the Dynamic and Auto radio buttons. Then click the Add button, and you should see the text D5150 show up in the textarea just above the “Add a new forwarded port”.

Your Putty window should now look like the next figure:

Putty Tunnel window after data has been populated

That’s all you have to do on this screen. In the Putty navigation tree on the left click on the Session node (at the top of the tree), and then click the Save button on the right side of the screen to save this configuration.

To always start Putty as root (it has to be root in Ubuntu to be able to be used as an ssh tunnel), use this command in the main menu entry:

gksu putty

Screenshot from 2013-06-04 12:39:30

Congratulations — that’s all you had to do to configure Putty. Now all you have to do is login to your remote server. To do this, just click the Open button at the bottom of this window. You should see a Putty login shell open up to your remote server. Just login to your remote server with your username and password, and you’re done. That’s all you need to do to open the tunnel. Now you’re ready to configure Firefox.


Configuring Firefox to use this new SSH tunnel is simple. Start Firefox, then select the Tools menu, and then select the Options... menu item. Now click the Advanced icon (on the upper-right of the dialog), and then select the Network tab. This is shown in the next figure:

Firefox network configuration window

Now click the “Settings…” button. This brings up the Connection Settings dialog. On this dialog click the “Manual proxy configuration” radio button, then put the address in the SOCKS Host field. In the Port field just to the right of the SOCKS Host field enter the port you used when configuring your SSH tunnel with Putty. In my case this port was 5150. The completed dialog is shown in the following figure:

Firefox SOCKS proxy network configuration

That’s all you need to do here. Just click OK on this dialog, click OK again on the Options dialog, and Firefox should be ready to go.

Chrome  (autostart in Ubuntu)

In Google Chrome you cannot set a separate proxy (different from the systemwide proxy) to browse the internet using the basic settings. But you can definitely tweak the settings to set a proxy for Chrome that is not same as the systemwide proxy settings.

for Google Chrome in Linux right click on the Desktop Icon or the Gnome panel Icon and click on properties. In the dialog box that opens, add this line before the %U in the command field.

 /usr/bin/chromium-browser –proxy-server=socks5://

You can see this screenshot below for a better understanding of the steps as discussed earlier.


Notice the – – in the command.  Wordpress still see’s this as one long dash.



Set Separate Proxy in Google Chrome for Linux

Categories: Linux Tags: ,
  1. No comments yet.
  1. No trackbacks 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


Get every new post delivered to your Inbox.

%d bloggers like this: