Verfasst von: digistractions | Oktober 19, 2007

Use SSH tunneling as a proxy

I did not know that it is straight forward to use SSH as a SOCKS proxy for your web browser. Simply use the command line switch -D portnumber:

$ ssh -N -D 50000

If you want also an interactive shell session, leave out the -N. In order to avoid conflicts select a portnumber larger than 1024. Then, configure your web browser to use the proxy. In the network preferences select SOCKS proxy (I selected SOCKS 5). Additionally, enter localhost or as the server and the portnumber from above.


Now, the internet traffic of the browser is encrypted from the local machine up to the remote server and you appear (requesting IP) on the internet as the remote server.

Note that with firefox your DNS requests, however, are not using the proxy by default and could be spoofed on the local network, e.g. an open WLAN. This can be fixed in the „about:config“ preferences by setting the value of network.proxy.socks_remote_dns to true. I don’t know about other browsers yet.

Verfasst von: digistractions | Juni 22, 2007

Hello world!

First post on WordPress. This blogging stuff looks more complicated than I expected. I guess learning by doing is the way to go.