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 user@server.domain.com

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 127.0.0.1 as the server and the portnumber from above.

picture-1.png

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.

Advertisements

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

Kategorien

%d Bloggern gefällt das: