Proxied HTTP

May 29, 2010

Ssh has a thing called DynamicForward. It is actually SOCKSv5. Since Firefox is socks enabled, you can use your cs account as a proxy for web browsing. This is useful, for instance, to get to web pages that are only available from inside UM, such as CCS, or some of our internal-only sites.

  1. In .ssh/config include the line “DynamicForward 1080” or use -D 1080 as an ssh option on the command line.
  2. In Firefox->Preferences->Advanced->Network->Settings find the panel “Configure Proxies to Access the Internet”. Select Manual and for “SOCKS Host” enter 127.0.0.1 and port 1080. Selection also “SOCKS v5”. Then OK.
  3. To remove the proxy, select “No proxy” from the “Configure Proxies …” panel.
  4. No need to restart browser. You have to have ssh up and running.

What happens is that all HTTP requests are sent to port 1080 on your localhost, wrapped inside of a SOCK protocol. That request goes into the ssh session and emerges on whatever machine you are ssh-ing to, say Lee. Lee makes the HTTP request in proxy for your browser, and returns the response back through the ssh channel´╗┐.

posted in Uncategorized by admin

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org