Setup OpenVPN On Android

There are many reasons why you might want to use a VPN, but the number one reason why you should use a VPN, is to ensure your connection at a public hotspot, such as at a hotel or airport, is much more secure.



This tutorial assumes you used one of my previous OpenVPN tutorials to create an OpenVPN server, and want to use that server for your android device's VPN. Thus you should have the following files on your local computer.

  • ca.crt
  • client.conf
  • client1.crt
  • client1.key
It does not matter if your files are named slightly differently, e.g. client.crt instead of client1.crt etc.

Configuration Steps

    Download the unofficial OpenVPN app, OpenVPN for Android, onto your device.
    Turn your client certificate and key into a single p12 file which is secured by a password.
    openssl pkcs12 \
    -export \
    -in client1.crt \
    -inkey client1.key \
    -out client1.p12 \
    -name client1
    You are going to have to type that password into the android device, so either make it easy to type, or use the wifi keyboard feature.
    Transfer the ca.crt, and the newly generated p12 file, onto your android device. For this I used the FTP server app so that I could transfer the files with Filezilla.
    Open up the App. You should see no profiles listed and will need to press the "ADD" button to create a new one. If you end up coming back later and need to continue configuring the profile, then you just need to press the other highlighted area shown below:
    Place the IP of the server in the "server address" field. Then click select next to "client certificate" and navigate to and select the pk12 file you generated earlier in this tutorial. Then for the CA certificate, select the ca.crt file you transferred across as well.
    For the IP and DNS settings, set "Pull Settings" to on, but override the DNS to use Google (8.8.8.8 and 8.8.4.4).
    You don't have to use Google's DNS, that's just what I recommend

Start The VPN

    To start the OpenVPN connection, go back to this screen and click the name of the profile, in this case "london".
    You should then see the screen below and your device will automatically connect. It does take a while and you may see some warning messages, but don't worry about this.
    You should now see the OpenVPN connection in the notification area.

2 comments:

  1. files on your local computer.

    ReplyDelete
    Replies
    1. Hey Ryan, I get the feeling there was a question there but can't understand it. Can you please confirm what you mean by your comment?

      Delete