Tunneling with SSH and Firefox

This guide will explain how to create a SSH tunnel to use with Firefox. Creating an SSH tunnel will create an encrypted connection to an outside machine to visit websites that may be inaccessible from a specific location. (Work, School, etc.) If my web site gets blocked at some point, it will probably be because of this article. The idea of this is not exactly to circumvent filters, but it works perfectly for that too.

Part 1: Create an SSH Tunnel
Unix / Linux / OS X:

  1. In the terminal type: $ ssh <SERVER> -D <PORTNUMBER> -l <USERNAME> -C

With the above command, <SERVER> is the remote server running the SSH service you will be using to create the tunnel. <PORTNUMBER> is any number between 1025 and 65535, and <USERNAME> is the username you will be using to connect to the remote server. After issuing that command, if you don’t get any errors, jump to Part 2.


  1. Download PuTTY.
  2. Launch PuTTY. On the initial screen, enter the remote address of the server you will be connecting to in the “Host Name (or IP address)” field.
  3. In the ‘Category’ list, expand the ‘SSH’ option, and select ‘Tunnels’.
  4. In the ‘Source port’ field, type in any number between 1025 and 65535. Select ‘Dynamic’ under the ‘Destination’ field, and click on the ‘Add’ button.
  5. Click ‘Open’ at the bottom of the window to start the connection.
  6. A new window will open up and prompt you for your user credentials. Enter your username and password. While entering your password, nothing will show up on the screen.
  7. After submitting your credentials, if you don’t get any errors, you should be successfully connected to the remote SSH server.

Part 2: Configure Firefox

  1. First of all, if you don’t have Firefox, go to GetFirefox.com and download yourself a copy of it. If you are on a Windows machine that is not your own, consider grabbing yourself a copy of Portable Firefox for this guide and throwing it on a flash drive.
  2. After your copy of Firefox is up and running, whether it be Firefox or Portable Firefox, it’s time to install FoxyProxy. Add the add-on to Firefox, and restart Firefox when asked.
  3. Launch the FoxyProxy options. From the ‘Tools’ menu, hover over FoxyProxy and jump down to ‘Options’. From the status bar, right click on the FoxyProxy icon, and select ‘Options.’
  4. Click the “Add New Proxy” button.
  5. A new window will appear. “Proxy Details” will be the tab initially selected. If not already selected, select “Manual Proxy Configuration”. In the “Host or IP Address” field, enter ‘’ and in the ‘Port’ field, enter the port number you used in Part 1. Make sure the check box for “SOCKS proxy” is checked. We will be using “SOCKS v5,” so select that.
  6. Click on the ‘General’ tab, and in the “Proxy Name” field, give the proxy a name that summarizes what this proxy will do for you, or where it will connect you to. You could even keep it as generic as “SSH Tunnel.”
  7. Click the “OK” button in the “Proxy Settings” window. You will be prompted with a message about not adding any web addresses to the domain white-list. That’s fine, just click “OK” again. Once back on the main “FoxyProxy Options” window, just click the ‘Close’ button to close it.
  8. Time to activate the proxy. From the ‘Tools’ menu, hover over FoxyProxy and select “Use Proxy <PROXYNAME> for all URLs.” From the status bar, right click on the FoxyProxy icon, and select “Use Proxy <PROXYNAME> for all URLs.”
  9. At this point, any web site you visit will be proxied through your SSH tunnel. If something is not working for you, go back and check all of your settings from Part 1 and 2.
  10. When you are finished using your proxy, be sure to disable FoxyProxy. If you don’t disable FoxyProxy and your connection from Part 1 is not running in the background, your connection to the internet is going to appear dead. To do so, from the ‘Tools’ menu, hover over FoxyProxy and select “Completely disable FoxyProxy.” From the status bar, right click on the FoxyProxy icon, and select “Completely disable FoxyProxy.”

Leave a Reply

Your email address will not be published. Required fields are marked *