I have OpenVPN working. The tun adapter should be compiled into the kernel. if it is not feel free to get a p3droid kernel they have the tun adapter compiled into the kernel.
I am going to assume you have some Android/OpenVPN knowledge. This includes how to generate keys and how to setup your server. If you need help with these steps let me know I can go into far more detail.
The simple way to get it working is to download the OpenVPN Installer and the OpenVPN Settings both by Friedrich Schäuffelhu. Install OpenVPN Installer and then configure your settings by creating an OpenVPN folder on the root directory of your SD card. My config is listed at the end of this post.
There is two problems that you can run into with OpenVPN. The first problem is that version that OpenVPN installer installed when I first used it was the newest version which has a bug. From what I have read the bug was created when the locations of the files OpenVPN calls were hard coded. There are two ways to solve this. Downgrade to the previous version or a version which does not have this problem. If you google “openvpn-android-2.1.tar.bz2” you should be able to find the forum where I found most of this information about this bug and download the OpenVPN binary. This should be pushed to the /system/xbin/ folder. The other solution is to create a Symbolic Link from the /system/xbin/ folder to /system/xbin/bb. (Command: ln -s /system/xbin /system/xbin/bb )
The second problem you will run into is how OpenVPN deals with routing on android. When I setup my server on my windows box, I have it set to push the route, gateway and dns. These commands are not compatible with android. They have to be rewritten and put into the *.ovpn config file. So far I have not bothered to do this because I can’t imagine a time when I would ever want to route all my traffic from my phone to my home local network.
This is the config. I am using. You will have to modify this script to match how you have your server setup.
Dev tun //(I put in tap because I have a tap setup)
Remote (Your outside ip) (Your OpenVPN Port)
Tls-auth /sdcard/OpenVPN/ta.key 1
Cert /sdcard/OpenVPN/(Your Cert Name).crt
Key /sdcard/OpenVPN/(Your key Name).key
Cipher (openvpn cipher you used)
Log /sdcard/openvpn/openvpn.log //not needed but very very useful to debug problems
#route-up “/system/bin/sh/sdcard/openvpn/up.sh // noted below
I was also told I needed an “up.sh” script to fix some sort of routing problem after the OpenVPN connection is disconnected. I am not sure if this script really does anything useful or not but I have included it in case it does something for you.
You will need to chmod 755 this file in order to be able to execute it.
/system/xbin/route del (your outside ip)
Once you get to this point you should be all configured open OpenVPN Settings and click the OpenVPN check box. You should also see a box next to whatever you named your *.ovpn file. Check that box and OpenVPN Settings will launch openvpn with your config file. To disconnect uncheck the OpenVPN box.
Hopefully this will get you up and running :-D