(via embraceubuntu.com)
$ ssh -D 9999 username@ip-address-of-ssh-server
This will create a SOCKS proxy on port “9999″ of your computer (localhost). This is a secure tunnel to the server. Now all you have to do is set the preference in Firefox to use a SOCKS proxy. The proxy is, “localhost”, with the port 9999.
paranoid browsing
Set "network.proxy.socks_remote_dns = true" in about:config in Firefox browser. This makes it so that DNS is handled by the remote end of the tunnel as well.
tethering jail-broken iphone
This works well for tethering jail-broken iphone.
1. Jail-break and install openssh server on iphone.
2. Startup ssh on iphone.
3. Create and join ad-hoc wireless network, giving static IP addresses.
4. Ssh to iphone creating a socks proxy.
5. Configure browser to use proxy.
6. Enjoy.