OpenVPN isn’t anything new. But today I finally overcame a hurdle I had with trying to connect to our company VPN via my Android device. The OpenVPN for android project isn’t anything new; it’s actually been in the works since late 2009 if you follow it all the way back through a couple forks.
The main issue that was holding me up wasn’t anything to do with Android-OpenVPN port itself. It was simply to do with the Android device I was using (thanks Samsung for crapping on us with the Galaxy S devices). A recent ROM update finally put the final pieces I needed into motion for being able to utilize OpenVPN. The main holdback was the lack of tun in the kernel of my Android build.
Anyways, if you’ve been needing VPN access, or specifically need the OpenVPN variant they give it a shot. Outlined below is what you’ll need:
- A rooted Android device – You may also need an upgraded rom. The project is built using cynogen 6. If your device supports this ROM or one of its variants I highly recommend it. But if you’re like me and on a Samsung device or other unsupported device, look for upgrades at XDA-Developers.
- An OpenVPN configuration file. You’ll most likely have this along with your desktop client. (client.ovpn)
- Android-openvpn-installer – Available here or from the Android Market– this is mostly used to install the OpenVPN binaries onto your device.
- Android-openvpn-settings – This (and this) is what you’ll actually use in Android to start/stop/configure the VPN.
- A way to transfer files to your device’s SD card or internal storage (for those of you without expandable storage).
- Begin by rooting your device if it’s not done already. Look towards XDA-Developers if you need help with this.
- Install the OpenVPN-Installer either from the Google Code page, or directly from the Android Market.
- Run the installer and remember which path you choose to install OpenVPN into. I chose the “/system/bin” directory. You’ll need to enter this directory into OpenVPN-Settings later.
- If it installs correctly, it will show a green plus button and continue on.
- You’ll now need to transfer your OpenVPN configuration file to your device’s external storage. Create a folder on the root of the storage called “openvpn” and place your configuration file here.
- Install OpenVPN-Settings either from the Google Code page, or directly from the Android Market.
- Once installed, you’ll need to configure it. Menu (button) -> Advanced
- Now you’ll want to configure the two paths: “Path to configurations” and “Path to openvpn binary“
- Select them one at a time and enter the required paths. For me, the configurations path ended up being “/sdcard/openvpn” and the binary path was “/system/bin/openvpn“.
- Now return to OpenVPN settings by using your back button and you should see a connection listed with the same name as your configuration file.
- Enable the VPN by pressing the OpenVPN checkbox, once it’s enabled, press the checkbox for the connection you want to connect to.
- You’ll need to enter your username and password, but the notification will most likely be in the top bar, so pull it down, click the notification, and enter your credentials. (You’ll have to do this every time you connect, no saving here).
- Enjoy OpenVPN goodness!
They’ve made the process of using it pretty straight forward, especially for what it used to be. Feel free to check out the Google Code sites if you would like to contribute or have any issues.
One big caveat on all of this as Uncle Ben once said – “with great power comes great responsibility” so be sure to continue using safe (read secure) computing practices, as once you’re on the VPN, your device is now connected to your company’s VPN. In most cases, this is useful for communicating with exchange servers or shared file access. But be sure to disconnect when you’re done using it and ensure you keep a device password.