I have some colleagues who need to go to China for work, however while they're there, they can't access a lot of sites. One of which is GMail (Google Apps), which they need for work. We have a UK based Ubuntu server, which I have root access for.

What can I do for them? I thought about a Squid proxy, but it might rely on their hotel having port 8080 open, so, not ideal. Are there any workarounds or other solutions?

  • @Jed - I disagree. If it were just, "How do I access sites from China?" I'd agree with you. But this is, "How do I access sites from China? I have this server in the UK." So it seems to be appropriate here...but we'll see. The community opinion trumps the individual opinion.
    – Jason Berg
    Commented Mar 2, 2011 at 18:09
  • 5
    If it were as easy as just opening a Squid proxy server to get around the Great Firewall, I think China wouldn't have the reputation it has for limiting Internet access. Messing with their government restrictions is something I'm not sure I'd want to do, as it seems they don't have a sense of humor about that sort of thing. Commented Mar 2, 2011 at 18:12

3 Answers 3


My favorite solution to this problem simply requires SSH. SSH is the poor man's vpn. If the ubuntu box isn't already running ssh:

apt-get install openssh-server

If your colleague is using OS X/Linux in China, they would simply type:

ssh -D1080 your.ubuntu.server.tld

You can also set this in putty or other windows SSH clients.

Then your colleague would set their web browser to use a SOCKS proxy at localhost:1080.

Done. Should be easier than configuring a VPN. Your colleague just has to remember to uncheck the proxy setting when they are done.

For better server security require public key authentication instead of password authentication. But this is independent of tunneling traffic through China.


The answer will ultimately be "use a VPN". You could set up something like OpenVPN to tunnel to your Ubuntu server, or use another VPN solution of your choice either to your Ubuntu server or another location. You could also run your proxy or other solution on many different ports, to ensure that a single port being blocked doesn't stop you from accessing it.


In addition to chrishiestand's answer, please note the following:

When using SSH proxying to bypass websites that are blocked by DNS filtering, the DNS requests might not go through the proxy, causing a DNS leak and making the DNS requests go to the censoring DNS server. To check if there are leaks, go to https://ipleak.net/.

To fix the problem when using Firefox's proxy settings, make sure to check "Proxy DNS when using SOCKS v5".

If you want all programs to use the proxied DNS on Windows, it might be a little bit harder. This SO answer suggests running your own DNS server that forwards your DNS requests through a proxy. If anyone has an easier method, please let me know, and I will update this answer.

I used the system proxy settings on macOS, and there seem to be no DNS leaks there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .