- Mar 29, 2011
- 10
- 4
- 0
I was asked to post how I got the OpenVPN client working on my Thunderbolt with stock rom and kernel so here goes:
1) Root your phone and verify su is working.
2) Install the BusyBox Installer from the Market. When you run the installer, install version 1.18.4 into /system/xbin
3) Remount /system with read/write privileges using adb shell as root:
4) Symlink /system/xbin to /system/xbin/bb from adb shell as root:
5) Push the tun.ko module from my other post to /system/lib/modules:
6) Chmod the tun.ko module, load the module and verify it loaded correctly (from adb shell as root):
7) Install 'OpenVPN Settings' and 'OpenVPN Installer'. We will be replacing the openvpn binary from the installer with another one so it may not be necessary to install 'OpenVPN Installer' at all.
8) Place your openvpn config files (.ovpn, .key and .p12) in /sdcard/openvpn.
9) Replace the openvpn binary in /system/xbin with the one located here
10) Start up 'OpenVPN Settings' and open the Advanced Menu:
-check the box for load tun kernel module
-Configure TUN module settings to use insmod with /system/lib/modules/tun.ko as the path
-check the box for 'Fix HTC Routes'
11) Turn on OpenVPN and connect.
12) Edited copy of my client config:
dev tun
dev-node /dev/tun
persist-tun
persist-key
proto udp
cipher AES-128-CBC
tls-client
client
resolv-retry infinite
remote your_server_name 1194
auth-user-pass password.txt <--insecure, remove after testing
pkcs12 your_config_name.p12
tls-auth your_config_name.key 1
13) Troubleshooting
-netcfg command should show tun0 as up and with an ip from your vpn subnet
-'cat /proc/net/route' should show one or more entries for tun0 depending on your configuration
This is my first Android phone so I am by no means an expert.
I have not had anyone else test this yet but it is working for me including DNS and routing. I'd be happy to modify my post if anyone has any suggestions or additions.
1) Root your phone and verify su is working.
2) Install the BusyBox Installer from the Market. When you run the installer, install version 1.18.4 into /system/xbin
3) Remount /system with read/write privileges using adb shell as root:
mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system
4) Symlink /system/xbin to /system/xbin/bb from adb shell as root:
(this may be an unnecessary step)ln -s /system/xbin /system/xbin/bb
5) Push the tun.ko module from my other post to /system/lib/modules:
File attached as well.adb push tun.ko /system/lib/modules
6) Chmod the tun.ko module, load the module and verify it loaded correctly (from adb shell as root):
lsmod should output should contain something like "tun 11171 0 - Live 0xbf005000"chmod 644 /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
lsmod
7) Install 'OpenVPN Settings' and 'OpenVPN Installer'. We will be replacing the openvpn binary from the installer with another one so it may not be necessary to install 'OpenVPN Installer' at all.
8) Place your openvpn config files (.ovpn, .key and .p12) in /sdcard/openvpn.
9) Replace the openvpn binary in /system/xbin with the one located here
From adb shell as root:adb push openvpn-static-2.1.1 /sdcard
File repackaged and attached as well.cp /sdcard/openvpn-static-2.1.1 /system/xbin
cd /system/xbin
mv openvpn openvpn.old
mv openvpn-static-2.1.1 openvpn
10) Start up 'OpenVPN Settings' and open the Advanced Menu:
-check the box for load tun kernel module
-Configure TUN module settings to use insmod with /system/lib/modules/tun.ko as the path
-check the box for 'Fix HTC Routes'
11) Turn on OpenVPN and connect.
12) Edited copy of my client config:
dev tun
dev-node /dev/tun
persist-tun
persist-key
proto udp
cipher AES-128-CBC
tls-client
client
resolv-retry infinite
remote your_server_name 1194
auth-user-pass password.txt <--insecure, remove after testing
pkcs12 your_config_name.p12
tls-auth your_config_name.key 1
13) Troubleshooting
-netcfg command should show tun0 as up and with an ip from your vpn subnet
-'cat /proc/net/route' should show one or more entries for tun0 depending on your configuration
This is my first Android phone so I am by no means an expert.
I have not had anyone else test this yet but it is working for me including DNS and routing. I'd be happy to modify my post if anyone has any suggestions or additions.