Jan
19
Posted on 19-01-2007
Filed Under (Debian & Ubuntu) by Arun Bagul

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(127.0.0.1). 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@192.168.0.1
arun@192.168.0.1’s password:

….

arun@server:~$
** 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 127.0.0.1:8080 0.0.0.0:* LISTEN –
tcp6 0 0 ::1:8080 :::* LISTEN –
root@arunbagul:~#

** 8080 is the SOCKS proxy port of your local system. This is a tunnel to the server(192.168.0.1). 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(192.168.0.1). 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 ?

Cheers,
Arun Bagul

Similar Posts:

Be Sociable, Share!
(0) Comments    Read More   
Post a Comment
Name:
Email:
Website:
Comments:


www.flickr.com
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player
-->