Table of Contents

Remote access from China

Since internet access is very limited from China and VPN is definitely blocked there as well, you have a few options to circumvent the restrictions. These are all based on ssh tunnelling, because it seems the ssh protocol is not blocked.

ssh

Normally the ssh client connects through port 22 to the STRW ssh server, but it may happen that this port is blocked too. In that case the STRW ssh server is also listening on port 80 and port 443 (both standard web ports that are usually not blocked) for ssh connections. So you can connect like:

 ssh -p 80 ssh.strw.leidenuniv.nl -l <STRW username>

or

 ssh -p 443 ssh.strw.leidenuniv.nl -l <STRW username>

Tunneling to your desktop

In fact when you can connect through the ssh protocol you can use the tunneling mechanism to enable VNC access to your desktop as described here.

Proxying your browswer

Setup SOCKS proxy

First, you need to SSH to the remote machine with some special parameters:

 ssh -ND 8888 user@host.com

Some detail on those options:
-N don't start an interactive shell on the remote server
-D setup the SOCKS proxy on port 8888 on localhost

Configure Proxy Settings - OS Level

Now, go into your Network Control Panel, and then 'Advanced…' → 'Proxies'. Set the SOCKS Proxy (only) with your proxy settings: localhost / 8888. You DO NOT want to set the HTTP proxy, HTTPS proxy, etc.

From here, all your apps that are proxy aware (most of them, probably) will 'just work'.

Configure Proxy Settings - Firefox Only

In some cases, you may not want to mess around with the system settings, especially if you just have something quick you need to do. In that case, Firefox allows you to configure it's proxy settings separately from the rest of the OS.

Go to 'Preferences' → 'Advanced' → 'Settings…' → 'Manual proxy configuration'. The key here is that you want to fill in ONLY the SOCKS host and port, and not the HTTP proxy, etc. As above, the settings are localhost and port 8888 (assuming you followed the example SSH command above).