Muffinresearch Labs by Stuart Colville

SSH SOCKS Proxy | Comments (4)

Posted in Linux/Unix on 19th January 2007, 1:30 pm by Stuart

I first saw this tip a while back on the Ubuntu Blog and it’s a useful way of using SSH to set-up private web surfing. Not to mention I’ve come across several public wifi installs that leave port 22 unfiltered so providing you set firefox to run the DNS from the remote server you should be able to browse with complete success over port 22.

This should work with any openssh implementation so it’s all good on both macs, linux and windows (Though from a brief foray into the world of window you’ll need Cygwin. Download it and select and install OpenSSH as a minimum and then run the same commands below from the shell)

To set-up a SOCKS proxy on port 1080 simply run:

ssh -D 1080 user@your-ip-address

To make firefox do DNS lookups through the remote server simply set network.proxy.socks_remote_dns = true in about:config.

To use the proxy simply set-up the socks 5 proxy config (Options/Preferences -> advanced -> Network -> Settings) by selecting “Manual Proxy configuration” (or use a plugin to firefox like Proxy Switch) and set the SOCKS Host to 127.0.0.1 and the port to 1080. Lastly select “SOCKS v5″

To test the proxy is working go to http://whatismyip.com/ and you should find the ip addres of your server is displayed.

Post Tools

Comments: Add yours

1. On May 14th, 2008 at 3:39 pm karl said:

You can also have a SOCKS Proxy for Safari!

http://codesnippets.joyent.com/posts/show/1326

2. On May 22nd, 2008 at 7:53 am Kent R said:

Just noting that the URL for whatismyip = http://whatismyip.com/

3. On May 22nd, 2008 at 11:58 am Stuart Colville said:

@Kent: Thanks I’ve updated the link.

4. On November 7th, 2008 at 6:02 pm Geoff said:

From my testing, it looks like Safari sends DNS through the SOCKS proxy specified in the Network setting panel.

I’m using SSH Tunnel Manager 2 (http://projects.tynsoe.org/en/stm/) to set things up.







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.548s.