How To Set Up Your Own VPN

In A Nutshell

Setting up your own VPN server is fairly easy, especially if you are familiar with the Linux terminal. You can set up a VPN in as little as 20 minutes, by renting a VPS (Virtual Private Server) from a company like Vultr and installing OpenVPN. The install is “one-click” and the cost is about $5 per month.

The Details

OpenVPN is a free, open source application that allows you to install a VPN server and client. OpenVPN  is capable of traversing NATs (network address translators) and firewalls.

Installing OpenVPN is straightforward, but it helps to be technically inclined to perform this installation.

I recommend installing OpenVPN on a minimalist virtual server from Vultr (a less expensive DigitalOcean clone).

 

Obfuscating Your VPN Connections

If you need to obfuscate your VPN connection, see my article How To Hide Your OpenVPN Connection.

10 thoughts on “How To Set Up Your Own VPN”

  1. I am in China and just made my own VPN on DigitalOcean (thanks for the recommendation). I am trying to work out the kinks. Major kink is that it super slows my internet connection. Per http://www.speedtest.net, without VPN (Unicom ISP) I have 27Mbps download speeds, but connected to the VPN I have 1.0Mbps download speed. I am using just plain UDP. There are a lot more variables to rule out but at first glance does that seem normal? Could I blame this on connecting across the ocean? If I can connect at all does that mean China’s not blocking it? Is there a setting on DigitalOcean that I’m missing where they are throttling? I’m actually not sure how to tell where the slowdown is happening, for starters. The fact that the 1.0Mbps seemed so precise makes me think it’s some kind of artificial slowdown.

    1. I just came back from China at the end of April 2016. Digital Ocean worked fine but I used STunnel to go through SSL.In Nanjing, where in the past I could not even get 1Mps speeds with commercial services in the past, I was getting between 2-5Mps mostly. I’m sure I could have tweaked it more, but that was good enough for me. I didn’t seem to experience any dropped connections either. Despite the seemingly slow speed, my video streaming was pretty smooth. The problem you will have since you are over there already is that if you try to add STunnel and make a mistake on the configuration you might not be able to login to your server since you probably need the vpn to get to it anyway. I would suggest creating a second new server and then once you get it running with STunnel, you can delete the first server.

  2. Hi guys,

    I wish to sound a note of caution here.

    Don’t ever use a Digital Ocean server located in Singapore. If you are a customer of a VPN vendor, don’t connect to VPN servers in Singapore if your vendor provides them.

    Here’s a brief quote from Freedom House (https://freedomhouse.org/report/freedom-net/2014/singapore):

    Even without registration, surveillance is “an accepted but hidden fact of life” and “few doubt that the state can get private data whenever it wants,” as one technology blog put it.

    Under the sweeping Computer Misuse and Cybersecurity Act, for example, the minister for home affairs can authorize the collection of information from any computer, including in real time, when satisfied that it is necessary to address any threat to national security. Court permission need not be sought. Failure to comply with such orders is punishable with a fine of up to SGP 50,000 (US$40,000), a prison term of up to 10 years, or both.

    Under the Criminal Procedure Code, police officers investigating arrestable offenses may at any time access and search the data of any computer they suspect has been used in connection with the offense. No warrant or special authorization is needed. Penalties for non-compliance can include a fine of up to SGP 5,000 (US$4,000), six months in prison, or both. With authorization from the public prosecutor, police can also require individuals to hand over decryption codes, failing which they are liable to fines up to SGP 10,000 (US$8,000), jail terms up to three months, or both.

    I should know because I am Singaporean (born and raised in Singapore) and some of my friends campaigning for more rights of freedom of speech and expression have been arrested and jailed in the past two years. Two of them are awaiting trial this year.

  3. Hi,

    Awesome website. Do you think using this type of VPN would help users that are planning a trip to a certain Asian country with a red flag and some stars?

  4. It’s disappointing. i liked this ‘create droplet’ idea. It’s like you use it, then delete everything, and start again when u need it.

    It’s a shame if they keep logs…

    1. True, I’m going to ask Digital Ocean about their privacy policy. Perhaps they have some kind of no-logging policy.

  5. Am I compromising on anything by setting up my own beside the price increase?

    Won’t the VPS host keep logs etc. or am I compromising on security by using a vps?

    Can I choose server location like with commercial vpns?

    Thank you,

    1. All comments go into moderation first — your comment wasn’t deleted.

      In answer to your question, I don’t recommend using a VSP if your emphasis is on VPN privacy, since they probably do log. A VPS-based VPN is better for avoiding firewalls, streaming, etc.

      See this article for my list of anonymous VPNs.

Leave a Comment

Your email address will not be published. Required fields are marked *