SSH tunneling – for SOCK proxy port forwarding

SSH tunneling – for SOCK proxy port forwarding

Introduction –

SSH (secure shell) client can be used as “SSH tunneling for SOCK proxy port forwarding“.

ssh -D [bind_address:]port

* -D option in SSH can be used to specifies a local “dynamicapplication-level port forwarding. This works by allocating a socket to listen to port on the local side, optionally bound to the specified bind_address( Whenever a connection is made to this port(8080), the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh will act as a SOCKS server. Only root can forward privileged ports. Dynamic port forwarding can also be specified in the configuration file….

** How to use SSH tunneling for SOCK port forwarding –

root@arunbagul:~# ssh -D 8080 arun@
arun@’s password:


** Check the 8080 port is open or your local system –

root@arunbagul:~# netstat -nlp | grep 8080
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0* LISTEN –
tcp6 0 0 ::1:8080 :::* LISTEN –

** 8080 is the SOCKS proxy port of your local system. This is a tunnel to the server( Now all you have to do is got to set the preference in Firefox browser and use a SOCKS proxy. The proxy is, of course, “localhost”, with the port 8080. Now whenever you browse, all the connections you make to websites will seem to originate from the server to which you SSH-ed( In addition, all outgoing and incoming data for the browsing session will be encrypted since it passes through the SSH connection…

Find out what is possible with ssh ?

Arun Bagul

Similar Posts:

Leave a Reply

Your email address will not be published.