[Desire HD Android Development] mero01:
OpenVPN on SENSE & Buzz OC/UV 1.51Ghz 1.1.4 HOW TO

NEW UPDATE: 17/12/2010

OpenVpn.zip - FLASH IN CLOCKWORK MOD :D :D AND FOLLOW ON FROM STEP 4!!

WHAT IT DOES.

- New iptables

- New Openvpn binary

- All Symlinks created.

- All Permissions.

- Folders Created.

REQUIREMENTS:

-ROOT

-CWM-RECOVERY

-BusyBox

-OpenVpn config files, certs etc in /sdcard/openvpn

CONFIRMED WORKING ON :

-LeeDroid 1.2

-[RUU_Ace_HTC_WWE_1.32.405.6 Stock Sense Rom] - thanks to Walker Street For Testing.

Please inform me if you can confirm this working on Other ROM'S Thank you.

I AM USING

,

[KERNEL]Buzz OC/UV 1.51Ghz CFS+BFQ+SmartAss+TUN+EXT4+.27 ACE 1.1.4 [15/12/2010]

IN THEORY THIS SHOULD WORK WITH ANY SENSE ROM & KERNEL..

JUST MAKE SURE YOU THE KERNEL HAS A TUN.KO ETC CONFIGURED FOR IT.

DOWNLOAD :

http://dl.dropbox.com/u/15057375/mero01-xda/OpenVPN.zip

And a BIG thanks to ecips for helping with this :D :D

NO LONGER NEED TO DO ANY OF THIS , JUST USE OpenVPN.zip & FOLLOW ON FROM STEP 4!!

Ok guys had alot of problems gettings this too were it working, hopefully you guys might see some errors/fix's to improve on this :)

Requirements:

OpenVPN-Settings - Market

OpenVpn Binary File - Located in the openvpn4DesireHD.ZIP

LeeDrOiD HD v1.2 - http://xdaforums.com/showthread.php?t=842802

Buzz OC/UV 1.51Ghz 1.1.4 - http://xdaforums.com/showthread.php?t=835616

UPDATED 17/12/2010: CONFIRMED WORKING ON, LeeDroiD HD v1.2 & Buzz OC/UV 1.51Ghz 1.1.4

A) Not sure if this matters or not but i copied LeeDroids iptables file from the Desire.

B) Copy your client.conf or .ovpn file and certs to /sdcard/openvpn

C) Implementation:

1. Unzip/copy openvpn binary file to device.

1.b replace the current openvpn file in /system/xbin with this new one

1.c -- chmod +x with it.

adb remount
adb push openvpn /system/xbin/
adb shell
chmod +x /system/xbin/openvpn
exit

If " adb remount " didnt work

su
mount -o rw,remount -t yaffs2 /dev/block/mmcblk0p25 /system

in order to mount system as read/write

2. Make folder /system/xbin/bb

adb remount
adb shell mkdir /system/xbin/bb
exit

3. Make symbolic links to ifconfig and route & busy box.

THIS IS WERE THE PROBLEMS ALL COME FROM AND IF YOU HAVE ISSUES THIS IS WHAT WILL BE CAUSEING IT! :( SOMETHING TO DO WITH LINK BETWEEN BUSY BOX AND IFCONFIG......BUT I TRIED FROM FRESH BOOT AND IT WORKS FLAWLESSLY NOW :) WILL TALK TOO LEE ABOUT GETTING EVERYTHING INBUILT IN LEEDROID :)

adb remount
adb shell
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
ln -s /system/xbin/busybox /system/xbin/ifconfig
reboot

4. Install/Configure OpenVPN-Settings

4.0 Install OpenVPN-Settings from "Market" its free dont worrie ;)

4.1 On device, launch OpenVPN Settings.
4.2 Long press openvpn.conf, Preferences.
4.3 Check "Use VPN DNS Server"
4.4 Enter your VPN DNS Server
4.5 Script Security Level Select Built-in + scripts
4.5 press back
4.6 Click click the sub-menu option select Advanced
4.7 Load tun kernel module and make it 'insmod /system/lib/modules/tun.ko' before starting openvpn.

7.8 Change path to openvpn binary to /system/xbin/openvpn

Click " Fix HTC Routes "

You should now be connected :)

IF I FORGOT ANYTHING PLS LET ME KNOW VERY TIRED WHEN I DID THIS HAHA

Here is my config anyways for reference and here is my client config

client
dev tun
proto udp
remote XXX.XXX.XXX.XX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert mero-android.crt
key mero-android.key
comp-lzo
verb 6
script-security 2

Have also realised if you go terminal and do following gives you nice log :)

basicly , su root, cd to your openvpn folder location, run openvpn on your client conf

su
cd /sdcard/openvpn
openvpn client.ovpn

For added security. To make the OpenVPN request a password on connect. do the following

change step 4.5 to Script Security Level Select Built-in + scripts + passwords

add the following to your server conf.

username-as-common-name
plugin /usr/lib/openvpn/openvpn-auth-pam.so login

and this to your client

auth-user-pass

Change Log:

Use OpenVPN.zip & step 4 and beyond.

17/12/2010

DOWNLOAD:

http://dl.dropbox.com/u/15057375/mero01-xda/OpenVPN.zip