Using PuTTY to set up a SOCKS Proxy Connection
You can use the free
PuTTY program
on Microsoft Windows systems to establish an encrypted
Sockets Secure (SOCKS) proxy
connection. Note: a SOCKS proxy itself doesn't provide a secure path for your
data - see
Is
SOCKS Secure? - but establishing an SSH connection to a server
via PuTTY and then tunneling your web traffic through the encrypted SSH
connection to a SOCKS proxy thus created ensures that no one in between
the system on which you are running PuTTY and the SSH server to which you
connect can observe your traffic or know what websites you are visiting.
To use PuTTY to establish a local SOCKS proxy that will use an SSH
server to which you are connecting with PuTTY, take the following steps
(written for PuTTY 0.63, but will apply to other versions as well):
-
Create a new session or open an existing one to modify it then click on
the plus sign (+) next to SSH in the left pane of the window then click on
Tunnels.
-
Select "Dynamic", if you want PuTTY to provide a local SOCKS 4/4A/5 proxy on a
local port (note that this proxy only supports TCP connections; the SSH
protocol does not support forwarding UDP) and put a port number in the source
port field. Port 1080 is often used for SOCKS proxies, but you can pick any
port that is not in use on the system on which you are running PuTTY. After
putting the port number in the source port field, click on the Add
button, which will put "D" followed by the port number, e.g. "D1080", in the
"Forwarded ports" field.
-
Scroll up in the left pane of the PuTTY window to "Session", then click on
Save. Note: the connection type must be SSH.
Once you have PuTTY set up to establish a SOCKS proxy connection, you can
log into the remote SSH server by clicking on the Open button in
PuTTY with the system selected for which you configured the SOCKS proxy
support.
If you open a command prompt window on the system on which you are running
PuTTY, you should then see that it is listening for connections on port 1080,
or whatever port you picked for the SOCKS proxy connection on the
localhost address,
127.0.0.1.
C:\Users>netstat -a | find "1080"
TCP 127.0.0.1:1080 North1:0 LISTENING
TCP [::1]:1080 North1:0 LISTENING
You then need to configure your browser to use the SOCKS proxy.
References:
-
Creating a Socks Proxy Server with SSH
Date: November 28, 2006
MoonPoint Support
Created: Sunday February 15, 2015