This is a short guide how to get unhindered Internet access (HTTP) in a country or network which limits internet connectivity. You need access to OpenSSH server somewhere outside the network. These instructions were tested on OSX (Snow Leopard), but should work on other operating systems too.
SOCKS proxy is built into OpenSSH terminal connection software. OSX comes with ssh client.
Open Applications -> Utilities -> Terminal (on OSX) and type the command
ssh -D 8080 firstname.lastname@example.org
Login to the SSH and leave the connection open. If ssh complains about binding the port 8080, then you might have another ssh already running. Also the SSH server might prohibit using itself as a proxy.
Now, In Firefox (Firefox 4 or later) go Preferences -> Advanced -> Network -> Settings
Turn on Manual proxy configuration.
Socks hosts: localhost
Hit ok. If you lose network connectivity just restore proxy settings back to the automatic.
Go to www.whatismyip.com and see that it gives you the IP address of the SSH server, not your local internet connection as the result.
Firefox will start complain about proxy error when SSH connection is terminated.
If you also want to use non-proxied connection (faster) simulateneously, just open another browser e.g. Safari.
1. More info
Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+
Pingback: Set-up PPTP virtual private network (VPN) server on Ubuntu Linux | Open Source Hacker
For SOCKS5 proxied git you can do the following on OSX (netcat from Macports needed).
Assuming SSH SOCKS5 running in localhost:8090.
cat > /bin/proxy-wrapper
nc -xlocalhost:8090 -X5 $*
sudo chmod a+x /bin/proxy-wrapper
After this git will use SOCKS5 proxy for git:// protocol.
Works on GitHub.