Wednesday 8 August 2012

To cross GFW using SSH


Today, I tried to use SSH Forwarding to cross GFW. I don't care Chinese politics, but GFW prevent me from accessing a few good sites, e.g. google search engine, google document, google blogger, facebook, etc.

I succeeded after trying 1 hour. Here is my steps:
My OS is Ubuntu12.04 AMD64 bit Desktop.

1.You should get a remote server outside of China
My company rents a Ubuntu server from Amazon, sshd server is installed already.

2.Using the following command to launch ssh forwarding:
ssh -N -v -i mykey.ssh -D localhost:8888 ubuntu@amazon_server

Some explanations below:
-N means don't execute remote command
-v will display all details for debugging
-i mykey.ssh is my identity file for logging amazon server
-D means dynamic port forwarding
localhost:8888 means the local ssh will listen 8888 port on localhost
all requests to localhost:8888 will be forwarded to amazon_server
ubuntu is the username of amazon_server

3.Configure firefox to access localhost:8080 using socket5.

clieck Edit/Preferences menu, then select Advanced tab, click Network and press the Settings button for Connection.
Configure the dialog as following:


4. Remove any proxy plugin installed in Firefox. This costs me 30 minutes.

Enjoy it now.



No comments:

Followers

Contributors