How to Set Up OpenVPN On Your Android Phone

Sticking with the theme of Internet security, I recently became interested in securing my mobile Internet connection with a VPN as well as my connection at home. Fortunately, most VPN providers are aware that users need multiple connections with a single account, and both providers I've tried personally allow for this. This means my connection to my VPN can be active at home, plus I can be out and about on a 4G mobile connection and still remain protected. Here's how to make it happen. You won't believe how easy it is.

DISCLAIMER: Every VPN provider is different, and the tutorial I include here works for my provider of choice, and may very well work for several others, if not most of them. However, you should read your VPN providers' documentation carefully to determine if alternative or additional steps are necessary to use this app correctly. This tutorial WILL NOT WORK FOR EVERY SETUP and rather is meant to give a good idea of what it takes to get one going.

Get a VPN Account

Yes, that's right. Not everything in life is free, and you'll have to pay for a quality VPN connection. It's worth every penny. One of the most popular is HMA, but there are countless others. What you want to make sure of is that they have OpenVPN "preconfigured" files that you can use to easily set things up on your phone -- these are usually found in the ".ovpn" file format, and you will also be provided with a certificate file, usually "ca.crt".

Once you get an account, the provider will most likely give you a variety of installation instructions, and they may even use the same program I'm using here for Android.

My provider was very easy to set up, and utilized the default settings of the app for most everything, but your provider may be different!

Install the OpenVPN for Android App

There are several apps available for Android that will allow you to set up OpenVPN, but this one seems to be the most flexible and compatible, plus it's free. There is also an "official" OpenVPN app available, but it didn't work with my provider's configuration files.

Here's the download link from the Google Play store.

Copy the OpenVPN (.ovpn) and Certificate Files (ca.crt) to Your Device

Next, you'll want to head to your provider and grab the OpenVPN configuration files and certificate you'll need to set things up. Some sites require you to log in to a dashboard to get these, others do not.

When you unzip the package (or whatever you get from your VPN provider) you will be provided with several of these .ovpn files, all for different servers and protocols. So you can easily switch between them at will -- and because they are very small -- you may as well transfer all of them to a dedicated folder on your device. Note that with this app, you don't have to use these -- and in fact, this tutorial does not -- but while you're at it, you may as well copy them over in the event you switch apps or need them at some point. This tutorial does need the certificate file, however.

Basic Configuration of OpenVPN for Android

OpenVPN for Android Setup

Shown above is the screen you'll get when you first load the app.

OpenVPN for Android Setup

Head to "VPN Profiles," then click the plus symbol to add a new connection. You will be asked to give the configuration a name, then it will be listed on the main screen when you go back. Once you do this, tap the "settings" symbol to the right of the connection.

In this next menu, select "Basic."

For my provider, I was required to change four things here -- your provider may differ, and as such, make absolutely 100% certain to read all their documentation. This procedure MAY NOT WORK with your provider.

  1. Type in the server address from your VPN provider.
  2. Select "Username/Password" as the type.
  3. Input your account username and password. You may choose to leave the password blank, and if so, it will ask you every time.
  4. Select the certificate file you copied over from the file provided by your VPN service.

After completing the final step, you'll notice that the CA Certificate has been selected. Back out of this screen.

Go back to the main screen, then select "IP and DNS." I usually recommend that the stock DNS server be overridden; I prefer OpenDNS, but you can use whatever you like. Once this is configured, go back to the main menu and select the "Routing" option.

In this screen, make ABSOLUTELY SURE that the boxes shown above are checked. This will ensure that all Internet traffic on your phone will tunnel through the VPN connection. At this point you may be ready to test things out.

I'll say it again: Every VPN provider is different. Mine worked with minimal configuration of this app, and it's likely others do as well, but make sure to read your provider's documentation to check for any other settings that may need modifying.

Now, it's time to give this a shot. Go back to the main menu and click on the bar containing the name of your connection. The app will attempt to connect with the settings and certificate you have provided, and if all is well, you'll see the OpenVPN app icon and secure connection notifications appear as shown above.

Conclusions

For how easy it is, and how inexpensive VPN's can be, I recommend that anyone with an Android phone take advantage of OpenVPN... or at least have it set up and available if needed. Android makes it simple and easy to get OpenVPN configured. Plus, most VPN services allow up to 2 or 3 connected clients, meaning that you can have both your phone and home network VPN connection active at all times.

There is a speed disadvantage to be aware of. For example, in an area where I normally achieve ~2 Mbps on a 4G connection, with the VPN enabled I was only able to peak at ~1.2 Mbps, and that speed was less stable. Your mileage may vary, of course, but a protected mobile Internet connection is certainly worth that price in my book.

OvidiuT
OvidiuT's picture
If I have a windows VNP

If I have a windows VNP server (RRAS) which doesn't use certificates, how to configure the Client on Android to jump over the certificate step?