SSH Dynamic Port Forwarding

From LinodeWiki

Jump to: navigation, search

[edit] Description

SSH Dynamic Port Forwarding is a way to opening a SOCKS 4/5 proxy server on your local computer and forwarding all of the data to a SSH server on the Internet.

By using SSH Dynamic Port Forwarding you can create an encrypted tunnel to a trusted network, so others have a harder time hacking you.

This is a great feature to have when you are connecting to the Internet from an untrusted network as in an Hotel, Hacker convention or other not secure location.


[edit] Instructions

1. From a console prompt in GNU/Linux type the following to create the SSH Dynamic Port Forward.

root@linux$ ssh -D <localport> <remotehost>

where
      localport   Is the local port where the SOCKS server will be listening
      remotehost  Is the remote SSH server where you will forward your conection

Example:

root@linux$ ssh -D 1080 manuel@192.168.0.1

You can also setup the forward in Windows using [Putty]

You need to create a connection to a SSH Server as usual and in the SSH/Tunnels window setup add a forward using the following information:

Source Port: 1080
Destination: localhost
Type: Dynamic 

2. Now you need to setup Firefox (works for 3.6) to use this connection:

  • In GNU/Linux Edit/Preferences/General/Connection Settings
  • In Windows in the Tools/Options/Advanced/Connection Settings

Now on the Connection Settings Windows select the Manual Proxy Configuration and fill the SOCKS fields as follow:

SOCKS Host: localhost
SOCKS Port: 1080

Close the windows and you are ready to browse the web thru your secure network. If you use a service to find your public IP, you will see the IP of your SSH server.

  1. whatismyip
  2. showmyip
  3. checkip
  4. ipreal



--Meme 00:47, 7 May 2006 (EDT)

Personal tools