A few days ago the Pax Instruments team arrived in Shenzhen to manufacture the T400. There are many challenges ahead and we look forward to handling each one successfully. One of the more frustrating challenges is circumventing the internet censorship the government inflicts on the people who live here. Without censorship circumvention the internet can be extremely slow for sites outside China and some are completely blocked. To connect with people on Facebook and Twitter it is necessary to take action.

In this how-to you will learn to create a virtual server, setup a VPN server on the virtual server, configure VPN access on OS X, and configure VPN access on Android.

Create a virtual server

Creating a virtual server on DigialOcean is simple. Once you have your account, go the create droplet page. DigitalOcean has a referral program where you can get $10 credit, but you may have to sign up for the $10 per month plan. I’m not sure. Please post your experiences in the comments.

Name your vpn server. In this example we will use “vpn”, but any name will work just fine.
Screen Shot 2014-11-11 at 5.09.36 PM

Select the $5 option. You get 1000 GB/month transfer, which should be plenty for one person.
Screen Shot 2014-11-11 at 5.11.26 PM

Select Singapore. This will host your virtual server on DigitalOceans physical servers in Singapore. This will give you the fastest connection.
Screen Shot 2014-11-11 at 5.17.54 PM

Select Private Networking and IPv6. These settings may not matter, but it is how we have the Pax Instruments VPN setup and it works.
Screen Shot 2014-11-11 at 5.20.28 PM

Select Ubuntu. Other systems should works, but this this is what we use.
Screen Shot 2014-11-11 at 5.22.08 PM

Click Create Droplet.
Screen Shot 2014-11-11 at 5.31.55 PM

Your droplet will be created shortly. When we first tried to setup our droplet DigitalOcean was having a technical problem with the Singapore servers and the process would freeze after a few second. Everything was fixed when we tried ten minutes later.
Screen Shot 2014-11-11 at 5.32.46 PM

You should automatically be taken to your Droplets page. You will see listed all your droplets. You can see your droplet’s public IP address. Screen Shot 2014-11-11 at 7.15.42 PM

Setup a VPN server on the virtual server

You will receive an email with your droplet’s IP address and the root password. You will be automatically prompted to change this password the first time you log in via ssh.
Screen Shot 2014-11-11 at 7.19.57 PM

NOTE: In the code snippets below the entire command may not appear. You may need to scroll across the snippet window to highlight and copy the entire command.

Connect to your droplet and setup the VPN server.

bash-3.2$ ssh root@

On your first connection you will be asked to add the server’s RSA key to your keychain. Type “yes”.

The authenticity of host ' (' can't be established.
RSA key fingerprint is db:1e:78:fe:f1:bc:7d:7d:c6:e8:b1:37:ce:bb:7b:79.
Are you sure you want to continue connecting (yes/no)? yes

You will be asked for your password. Enter the password Digital Ocean sent you. You can type it in or copy and paste form the email.

root@'s password:

On first login you will be prompted to change the password for the root user. You will have to enter the original password then type a new password twice. Keep this password secret as it protect the entire server.

Changing password for root.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:

At the command prompt use the wget command to download the VPN setup script from github.

root@vpn:~# wget https://raw.github.com/viljoviitanen/setup-simple-pptp-vpn/master/setup.sh

Execute the VPN setup script. Replace “vpnuser” and “vpnpass” with the user name and password with which you would like to log into your VPN.

root@vpn:~# sudo sh setup.sh -u vpnuser -p vpnpass

The script will give you your server’s IP address, the VPN user name you selected, and the VPN password you selected. Verify the IP address is identical to the one DigitalOcean emailed you.

Detected your server external ip address:

VPN username = vpnuser password = vpnpass
* Restarting PoPToP Point to Point Tunneling Server pptpd [ OK ]

Your personal VPN server is setup and ready to use. We’d love to hear about your experience and how you used your VPN. Please post in the comments below.

Configure VPN access on OS X

OS X integrates VPN services, so there is no need for extra software.

Open System Preferences and click on Network.
Screen Shot 2014-11-12 at 10.08.24 AM

In Network Preferences click the plus sign to add a new network interface.
Screen Shot 2014-11-12 at 10.05.20 AM

Select VPN as the interface.
Screen Shot 2014-11-12 at 10.17.44 AM

Select PPTP as the VPN type.
Screen Shot 2014-11-12 at 10.13.22 AM

Give the service any name you like. You can leave it as “VPN (PPTP)”.
Screen Shot 2014-11-12 at 10.18.18 AM

Enter your server IP address and VPN user name. Check “Show VPN status in menu bar.
Screen Shot 2014-11-12 at 10.20.05 AM

Click “Authentication settings…” and enter your VPN password.
Screen Shot 2014-11-12 at 10.19.39 AM

Click “Advanced” and check “Send all traffic over the VPN connection.”
Screen Shot 2014-11-12 at 10.20.26 AM

In the menu bar click the VPN icon and select “Connect VPN (PPTP).”
Screen Shot 2014-11-12 at 10.36.51 AM

Now you’re ready to rock! Google “what is my ip“. If you see your server’s IP address, everything is configured correctly. Within China you can confirm this by visiting Facebook, which is normally censored.
Screen Shot 2014-11-12 at 10.34.17 AM

Configure VPN access on Android

Setting up VPN on Android is about as simple as it gets.

Go to Settings. Under Wireless & Networks, click “More…”

Click “VPN.”

Click the plus sign to add a new VPN server configuration.

Enter any name for the VPN, we’ll use “VPN (PPTP)”. Select “PPTP” as the type. Enter the server IP address. Check the encryption box. There is nothing in the advanced menu to configure. Click “Save.”

Click on “VPN (PPTP)” to enter your credentials and connect to the server. Enter your VPN user name and VPN password. Check “Save account information.” Click “Connect.”

Now you should be connected to the VPN server. There is a key icon in the upper left corner of your screen to indicate you are connected through the VPN.

Now you should be able to use Skype, Facebook and all the other wonderful thinks that keep you connected. Enjoy 🙂