Scaling the Great Firewall of China

It’s not news: China blocks a myriad of web sites which are deemed unsuitable for its citizen. But I’m not its citizen. On the occasional trips to China I suffer withdrawal symptoms from the lack of facebook, youtube and other random sites. Not to mention the epic distress suffered from keywords/URL filtering and strange results for things related to Tibet/Tiananmen (oops!).

VPN is a fine solution, but me being lazy, I prefer using softwares already present on my systems. SSH tunneling seems to fit the bill just nice. OpenSSH outside China (checked), Putty on laptop (checked), ready!

Putty

  1. Under Session, enter hostname.
  2. Under Connection > SSH > Tunnels, enter source port, select ‘Dynamic’ and click ‘Add’.
  3. Select ‘Open’ and log in with username and password.
  4. Halfway done; leave the window open.

OpenSSH (for *nix only)

    ssh -C2qTnN -D source_port_number username@remote_host.com

Browser (edit: only Firefox at the moment)

  1. Generally, look under options/preference > network > proxy to enter the address ‘localhost’ for SOCKS5 proxy using the source port number chosen.
  2. edit: (For Firefox) Enter about:config in the address bar, go (and promise you’ll be careful), enter network.proxy.socks_remote_dns in the filter bar and set the value to true.
  3. Surf on past the Great Firewall of China!

China happens to be the unfortunate example; insert country-that-does-funky-things-to-network-traffic here.

edit: Among the mainstream browsers, only Firefox allows remote DNS resolution via SOCKS proxy right now.

edit: Empirically, setting keepalive to 2 seconds on client-side seems to improve connectivity (China).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s