In my post yesterday, I talked about how to securely browse the web on an insecure Internet connection. The method I used was to install a proxy server (squid) on a trusted machine and ssh tunnel to it. However, one of my developers, Andy, kindly pointed out to me that there is a much easier way – just use SSH’s dynamic port forwarding as a SOCKS proxy.
To create the tunnel:
ssh -D 3128 [email protected]
To configure OS X to use the proxy, go to System Preferences > Network > Advanced > Proxies
Tick SOCKS Proxy, and specify the server as 127.0.0.1 port 3128, then click OK and Apply on the following screen, and that’s all you need to do!
Also don’t forget the -C option to ssh (compression). If it’s not already enabled, normal web browsing with contemporary machines is where compression is basically free, considering the CPU-time, and also sometimes brings surprising results.
Thanks Janos. I’ve just given the compression option a try on the relatively slow hotel wifi connection that I’m using here in Avoriaz, and it definitely seems to have speeded up general web browsing. Good tip!