Total Pageviews

Wednesday 26 September 2012

How to set up OpenVPN on the Android(for android2.x)


Using this guide you will be able to connect VPN using port TCP 443 which should work even if other VPN protocols are disabled.
IMPORTANT:
  • The guide has been tested on rooted Samsung Galaxy GT-l9100 by one of our customers.
  • Your Android device MUST BE Rooted.
  • Please mind that Unblock VPN is not resposible for any damage on your device caused by using this guide.

GUIDE:
  1. Install next applications from Android Market:
    • ES File Explorer
    • BusyBox Installer
    • OpenVPN Installer
    • OpenVPN Settings
  2. Install ES File Explorer
  3. Install BusyBox Installer
  4. Install OpenVPN Installer and OpenVPN Settings
  5. Make sure the Install Location and the BusyBox version are exactly the same as on the screnshot. Then click Install
  6. A pop-up message will appear and it will automatically download and install busybox. After finishing message, close BusyBox Installer application.
  7. Open ES File Explorer application, push Menu button and click on Settings
  8. Scroll down and check Root Explorer and Mount File System check boxes.
  9. Return to main page, And click on SD card shape button.
  10. Open /system/xbin/ folder. In the folder hit Menu button and click on New.
  11. Click on Folder.
  12. Name the new folder "bb", and click on OK button.
  13. Go back in /system/xbin/ folder, scroll down and find “ifconfig” and“route” files and copy them to /system/xbin/bb/.
  14. Long click on each of files and the pop-up message will appear. Click onProperties
  15. Click on Change
  16. Be sure that check boxes of execute are checked.
  17. Do this for both "ifconfig” and “route” files.
  18. Now download the OpenVPN configuration files and CA certificate.
  19. Open the downloaded ZIP file with ES File Explorer. Long click on zip file and the pop-up message will appear. Click on Extract to.
  20. Extract files to this location /sdcard/openvpn/. Click OK
  21. Open OpenVPN Settings application. Hit Menu button and click on Advanced
  22. Click on TUN module settings
  23. Make sure that Load module using is set to “insmod” and Path to tun module is set to “/system/lib/modules/tun.ko/”.
  24. Go back to main page, and check the OpenVPN check box.
  25. Chose which server do you want to connect and check the check box.
  26. A notification message will appear and ask you for username and password.
  27. Write your Unblock VPN username and password and click OK.
  28. When you are successfully connected to the server, the notification message will appear.
  29. When you want to disconnect, just uncheck the OpenVPN check box.
from http://unblockvpn.com/support/how-to-set-up-openvpn-on-the-android.html
----------------------------------
Android中配置OpenVPN的方法总结

如果你能够访问Android Market,那么以下步骤不必做
1、下载http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
2、解压缩获得openvpn-static-2.1.1,执行adb push openvpn-static-2.1.1 /system/xbin/openvpn
3、adb shell,执行chmod 775 /system/xbin/openvpn
上面步骤1-3可以用root explorer解决把openvpn-static-2.1.1改名为openvpn,放入/system/xbin, 放入前先按右上角的remount r/w,点这个openvpn长按,选Permissions,改权限为 第一排三个勾,第二排三个勾,第三排,第一和第三打勾
如果能够访问Market,请从这里开始阅读
在Market搜索并下载OpenVPN Settings Installer (图标和OpenVPN Settings相似的那个)并运行,点Install。
如果运行Install之后结果显示Binary Located并且图标变绿,请继续:
检查是否有busybox
打开终端,输入su,授权
提示符变为#后,输入
busybox which busybox
如果返回一个类似
/system/bin/busybox
的结果,说明已经安装了busybox,下面的安装busybox的步骤可以跳过
如果不能访问Market,请按照下面的方法安装busybox
下载安装busybox(附件)
安装方法:
解压,把busybox这个文件用root explorer拷入/system/bin/
更改其权限为:第一排三个勾全打,其余勾消掉。
如果能够访问Market,请用下列方法安装busybox:
这里下载busybox安装程序,并运行之.
busybox安装完成后,开终端
su
busybox which busybox
会返回你busybox的安装路径,比如我的是
/system/bin/busybox
把这个路径记下来
busybox mkdir /system/xbin/bb
ln -s /system/bin/busybox /system/xbin/bb/ifconfig
ln -s /system/bin/busybox /system/xbin/bb/route
最后两行命令,开头字母是小写L,不是小写I,要注意。
至此安装完成,在sd卡根目录建立openvpn文件夹,把发给你的四个文件(两个crt,一个key,一个ovpn)放入这个文件夹中,去Market下载TunnelDroid 用这个连接下载TunnelDroid http://cn.drop.io/vpnfiles/asset/net-sourceforge-tunneldroid-apk,暂时不要从Market更新,点menu-Preferences,Set DNS,填入 8.8.8.8,OK,返回。点 xxx.ovpn连接。
如果提示没有驱动(比如Milestone,请以“机型”“OS版本”这两个为关键字查找tun.ko这个文件。
这个是Milestone用的tun.ko,适用于2.1系统。
http://cn.drop.io/vpnfiles/asset/tun-zip
UPDATE:
这个是适用于Android 2.3.6 (2.6.35.7-gf5f63ef) 的tun.ko
from http://forum.xda-developers.com/showpost.php?p=18260197&postcount=12