OpenVPN - EVO 4G Themes and Apps

I having been beating myself up on setting up openvpn.
I'm stuck with exec format error when I try to load tun.ko.
Is there anyone that has openvpn working on this model and how did you get it working?
***** EDIT WORKING *******
I will post here so you don't have to read to the end to find the answer.
This is how to get it working with Fresh Evo- thanks to appzattak
install OpenVPN Installer (this may not be needed, but it won't hurt) and OpenVPN Settings from the market.
run the installer.
grab the tun.ko from here, http://forum.xda-developers.com/showpost.php?p=6792542&postcount=2
push the tun.ko file to /system/lib/modules/
place your openvpn config and key files and such in /sdcard/openvpn
download binary from http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
uncompressed and rename file to openvpn
push to /system/xbin
chmod 755 /system/xbin/openvpn
make a symbolic link in /system/xbin/bb to /system/xbin ('ln -s /system/xbin/system/xbin/bb')
Open open vpn settings and configure your paths
tun = /system/lib/modules/tun.ko
configurations = /sdcard/openvpn
openvpnbinary = /system/xbin/openvpn
put your openvpn conf file and keys into /sdcard/openvpn.
Reboot phone for good measure and you should be set.

good luck, i' too would love to have this but could never get it working....

Well I managed to make a little more progress. Here is what I have done thus far.
I installed OpenVPN Installer and OpenVPN Settings from the market. I then ran the installer. I grabbed the tun.ko from here, http://forum.xda-developers.com/showpost.php?p=6792542&postcount=2
then i pushed the tun.ko file to /system/lib/modules/. Then I placed my openvpn config and key files and such in /sdcard/openvpn
Next I connected the phone to my computer and ran this:
adb shell
su
insmod /system/lib/modules/tun.ko
then fired up openvpn setting and initiated my connection. It connects, but I cannot access anything. I did a logcat and did see an error with ifconfig so not sure what that could be. Also to note, the above insmod command seems to be run everytime the phone is rebooted. even though openvpn settings has a setting to make that happen before it tries, but it don't work.
Hope this helps others try and figure this out, and get it working.
--Steve
EDIT: Here is the error from logcat:
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS
208.67.222.222,dhcp-option DNS 208.67.220.220,route-gateway 172.16.100.20,ping 1
0,ping-restart 120,ifconfig 172.16.100.230 255.255.255.0'
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 Options error: Unrecognized option or missing parameter(s) i
n [PUSH-OPTIONS]:6: ifconfig (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 OPTIONS IMPORT: timers and/or timeouts modified
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 OPTIONS IMPORT: route-related options modified
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
ul 2 13:22:19 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modi
fied
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/pebkac.ovpn]-daemon-stdout( 843): Fri J
Click to expand...
Click to collapse

I got it working, did almost the same steps as @appzattak, only difference is I overwrote my ifconfig with busybox's ifconfig. Then openvpn connects and works perfectly, now I just need to figure out how to get dns to work with a split tunnel setup =)
Oh I have to overwrite my ifconfig everytime I reset, since I'm using unrevoked I can't permanently write to my /system/bin directory (I don't think anyhow?)
Let me know if you need more help.

delta18 said:
I got it working, did almost the same steps as @appzattak, only difference is I overwrote my ifconfig with busybox's ifconfig. Then openvpn connects and works perfectly, now I just need to figure out how to get dns to work with a split tunnel setup =)
Oh I have to overwrite my ifconfig everytime I reset, since I'm using unrevoked I can't permanently write to my /system/bin directory (I don't think anyhow?)
Let me know if you need more help.
Click to expand...
Click to collapse
How did you overwrite ifconfig
Sent from my PC36100 using XDA App

U have too install busybox
used a app called gscript lite to run this command as root:
cp /system/bin/busybox /system/bin/ifconfig

delta18 said:
U have too install busybox
used a app called gscript lite to run this command as root:
cp /system/bin/busybox /system/bin/ifconfig
Click to expand...
Click to collapse
awesome, got it working. I did have to use xbin instead of bin though...I already had busybox installed as I have fresh latest rom.
Thanks!

appzattak said:
awesome, got it working. I did have to use xbin instead of bin though...I already had busybox installed as I have fresh latest rom.
Thanks!
Click to expand...
Click to collapse
I take it back, it is still not routing correctly. I thought it was but did not realize I was connected to my home wifi and my home vpn server, thus it worked...but now I'm away from home and it connects but I cannot access anything.....so how did you get your working exactly...and what rom are you using?

I'm still stuck in the same area.
I downloaded the tun.ko file that you posted. next I remounted the /system as read write. then i pushed the tun.ko to /system/lib/modules. I then remount the system as read only
finally I run this command and get this result.
# su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
any help would be greatly appreciated

bar3m3tal said:
I'm still stuck in the same area.
I downloaded the tun.ko file that you posted. next I remounted the /system as read write. then i pushed the tun.ko to /system/lib/modules. I then remount the system as read only
finally I run this command and get this result.
# su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
any help would be greatly appreciated
Click to expand...
Click to collapse
I dont have that error, I actually run that command successfully, and I got OpenVPn setting to send that command first and it connects.

which Rom are you using?

Fresh 0. 5. 3
Sent from my PC36100 using XDA App

I will try that one and see what I can do, I was on Damagecontrol.
Will report back if I can get it working and resolve the routing issues.

ok, with Fresh I have it connecting now, but the client disconnects right away and the server does not know it. now to get to loging the client side so I can see why it disconnects right after the server thinks everything is good

ok, the connection stays connected now by changing dev /dev/tun to dev-node /dev/tun.
however if I run ifconfig or busybox ifconfig the tun interface does not show up....

Mine stay connected, but still cannot access any servers on the vpn side. Here is another snapshot of logcat where I think the problem is:
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 PUSH: Received control message: 'PUSH_REPLY,route 172.16.10.0 2
55.255.255.0,route 10.139.146.1,ping 10,ping-restart 60,ifconfig 10.139.146.6 10
.139.146.5'
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 Options error: Unrecognized option or missing parameter(s) in [
PUSH-OPTIONS]:1: route (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 Options error: Unrecognized option or missing parameter(s) in [
PUSH-OPTIONS]:2: route (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 Options error: Unrecognized option or missing parameter(s) in [
PUSH-OPTIONS]:5: ifconfig (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 OPTIONS IMPORT: timers and/or timeouts modified
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 TUN/TAP device tun0 opened
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:13 2010 TUN/TAP TX queue length set to 100
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:14 2010 Initialization Sequence Completed
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/wci.ovpn]-daemon-stdout( 825): Mon Jul
5 22:11:14 2010 MANAGEMENT: >STATE:1278393074,CONNECTED,SUCCESS,,69.198.200.238
Click to expand...
Click to collapse
Also when I run the ifconfig or the busybox ifconfig, the tun interface does not show up either...odd....anyone else have any ideas here??

Bam! I got it working now. It seems that the binary that I installed which was the App OpenVPN Installer installs a messed up version of the openvpn binary. So I stumbled onto this and it fixed it.
http://code.google.com/p/android-openvpn-settings/issues/detail?id=26
Basically I downloaded that binary, renamed it to just openvpn and pushed it to /system/xbin. created that symlink it says and did a chmod 755 /system/xbin/openvpn, and a reboot for good measure. Then it worked me is very happy right now...w00t!

Sweet!!!
It is working properly with that. Now I can remote into my office and work on any server I need to from my phone.. this is great.

I hear ya...this is gunna make my life so much better as I connect to many clients that I install openvpn at.....I'm surprised more folks don't need this....

It surprises me as well... apparently not that many people using openvpn see the value of this .. or there just are not as many people out there using openvpn.

Related

OpenVPN with Root - Updated 8/19

Easy way - OpenVPN on rooted/S_OFF Incredible with BusyBox installed:
This is by far the easiest way to set up OpenVPN. Make sure you copy your config file and any relevant keys to a folder on your sdcard. First, you need to know where BusyBox is installed, and if you already have the tun.ko module. For BusyBox, for most Roms based off the 2.2 8/1 leak, the location is /system/xbin. An easy way to check on your phone:
adb shell
find / -iname "iptunnel"
The path containing the file is where BusyBox is installed. If you don't have it installed, you can follow the instructions at the bottom of this post to install it.
The tun.ko module depends on your kernel. With the hydra 2.2 kernels, the location is /system/lib/modules/tun.ko . Easy way to check:
adb shell
find / -iname "tun.ko"
If you do not have tun.ko on your system, then you can download it for 2.2 (tun.zip) or 2.1 (inside openvpn.zip) attached to this post.
Next, download the following two apps from the Android Market:
OpenVPN Installer
OpenVPN Settings
Next, run OpenVPN installer, click install, give it an install path (I prefer /system/xbin), and give it the path to BusyBox.
Finally, run OpenVPN Settings. Go to Menu -> Advanced, make sure "Load tun kernel module" is checked.
Click on "TUN module settings"
Change "Load module using" to insmod
Change "Path to tun module" to... the path to your tun.ko file. Click back.
Update "Path to configurations" and "Path to openvpn binary".
That should be it!
This is how to run OpenVPN on a rooted Incredible using unrEVOked root and the stock 2.1 ROM with S_ON
NOTE: This is only for rooted Stock 2.1 without S_OFF. If you have S_OFF via unrevoked forever, just use Openvpn Installer and Openvpn Settings, both available in the market. Much easier!
This is my first time doing something like this, so bear with me if it is a little rough!
You must have root access to set this up. You do NOT need to go back into recovery adb though.
First, download the attached openvpn.zip containing the following:
tun.ko - kernel module for 2.1.
openvpn-static - statically compiled openvpn
If you are using 2.2, tun.zip contains the module compiled for the 2.2 kernel (thanks Apalyan!)
You will already need to have a working client.conf, and any associated keys. Copy the following files into a folder named 'openvpn' on the sdcard, or push with the following:
adb mkdir /sdcard/openvpn
adb push tun.ko /sdcard/openvpn/tun.ko
adb push client.conf /sdcard/openvpn/client.conf
adb push client.key /sdcard/openvpn/client.key
adb push client.crt /sdcard/openvpn/client.crt
adb push ca.crt /sdcard/openvpn/ca.crt
adb push openvpn-static /sdcard/openvpn/openvpn-static
The following must be done in a root shell:
adb shell
su
mkdir /data/openvpn
dd if=/sdcard/openvpn/openvpn-static of=/data/openvpn/openvpn
chmod 700 /data/openvpn/openvpn
Use the OpenVPN Settings configuration below to start/stop openvpn.
Note: All of the code was already written and ported to Android by the guys behind OpenVPN Settings. I just compiled a new tun.ko from the Incredible kernel source, and recompiled the statically linked openvpn with updated paths to ifconfig and route.
ADDED (thanks wraithdu!):
If you have trouble with post-connection routing, you may need to install busybox for a more powerful route/ipconfig. Instructions are here:
---
busybox is installed by the latest rooting process, but it's not a full install, ie it does not create all the command links. I got the file from the Titanium Backup site:
http://www.matrixrewriter.com/android/files/busybox-1.15.3.zip
To install:
1) extract and push busybox to your sdcard, reboot into recovery
2) mount /system
3) if you don't have /system/xbin (you should), create it
adb shell:
# mkdir /system/xbin (if necessary)
dd if=/sdcard/busybox of=/system/xbin/busybox
cd /system/xbin
chmod 755 busybox
./busybox --install .
4) reboot and done
OPTIONAL - before rebooting replace the busybox installed by the root process in /system/bin
1) mv /system/bin/busybox /system/bin/busybox.bak
2) cp /system/xbin/busybox /system/bin/busybox
OpenVPN Settings Instructions
OpenVPN Settings v. 4.6 works flawlessly with this! Here are setup instructions:
Install OpenVPN Settings v. 4.6 from:
Can't post links yet, do a google search for OpenVPN Settings, go to the Google Code download page, and download version 4.6.
Then, launch OpenVPN Settings, press Menu -> Advanced, and fill in the following settings:
Load tun kernel module - Checked
TUN module settings:
Load module using - insmod
Path to tun module - /sdcard/openvpn/tun.ko
Path to configurations - leave default
Path to openvpn binary - /data/openvpn/openvpn
It should work beautifully then.
any way to do it with non certicate based connections? i.e., group/psk configs?
The certificate setup isn't important, it is just how mine is set up. Any valid .conf should work.
ifconfig error
i got it all installed , it connects, but then in the end it says fatal error, ifconfig failed, could not execute external program. any ideas
You can run it manually to see what exactly is happening. Try the following:
adb shell
su
/data/openvpn/openvpn --config /sdcard/openvpn/client.conf
What generates the error?
error
Wed Jun 16 08:52:50 2010 /system/xbin/bb/ifconfig tap0 192.168.200.2 netmask 255
.255.255.0 mtu 1500 broadcast 192.168.200.255
Wed Jun 16 08:52:50 2010 Linux ifconfig failed: could not execute external progr
am
Wed Jun 16 08:52:50 2010 Exiting
and ifconfig is under /system/bin not /system/xbin/bb/. do you guys know where i need to change that?
The ifconfig stuff is hardcoded. I uploaded the wrong version - try this one.
Works perfectly
THANK YOU , works great
fang0654 said:
The ifconfig stuff is hardcoded. I uploaded the wrong version - try this one.
Click to expand...
Click to collapse
Thanks very much for this! Will be trying it later today.
Fang - Thanks again. Do you have any suggestions on a util or tutorial on making a conf file? I've access to our Cisco ASDM for our ASA, the URL for the ASA, group name, Group key, and of course my username and pw.
For that, you need vpnc instead of openvpn.
I know the problem with using the VPN Connections app is that the tun.ko autoload doesn't work. There are a couple of things you may be able to do as a workaround.
1. Load the module by hand:
adb shell
su
insmod /sdcard/openvpn/tun.ko
or 2. Use the OpenVPN Settings app from above to load the tun module (just start openvpn, then stop it), then try out the VPNC app.
I don't have a Cisco vpn so I don't have any way of testing whether this works.
Gets "failed to connect" immediately. know of any way to launch the vpn connections via command line to see where it is failing?
This worked like a charm! Thanks very much for this guide.
Stupid question, how do I get to a adb shell? I already rooted the phone. I don't have to do the rooting process all over do I?
If your running Linux, just type "adb shell" in you terminal window - make sure your phone is connected via USB cable - you should get the "$" after this command and then your in your phone's shell.
I believe windows is the same way, but I only have Linux stuff running now...
Thanks a lot for putting this together!
mattwood2000 said:
If your running Linux, just type "adb shell" in you terminal window - make sure your phone is connected via USB cable - you should get the "$" after this command and then your in your phone's shell.
I believe windows is the same way, but I only have Linux stuff running now...
Click to expand...
Click to collapse
With the phone connected via USB (Disk drive or anything), I type "adb shell" and get device not found. I'm running Windows 7. Phone has been rooted (have Wifi Tethering installed). Just having issues getting it back to the shell command like when I first rooted it :/
make sure USB Debugging is enabled
OK, had a misspell in the tun.ko file.
I'm connected now. But unable to connect to anything on my network. Still looking into it.
Any ideas? I've restarted the phone. I'm connected to my OpenVPN server. I cannot ping the IP assigned to it (from OpenVPN status page). I cannot ping anything on my internal network from the shell. Shows no data moving. Do I need to do something?
I did a netconf and i have this:
tap0 UP 172.30.100.255 255.255.0.0 0x00001043

[17/12][UPDATE]OPENVPN.zip!!FLASH WITH CWM-ANY SENSE ROM

OpenVPN on SENSE & Buzz OC/UV 1.51Ghz 1.1.4 HOW TO
NEW UPDATE: 17/12/2010
OpenVpn.zip - FLASH IN CLOCKWORK MOD 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
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://forum.xda-developers.com/showthread.php?t=842802
Buzz OC/UV 1.51Ghz 1.1.4 - http://forum.xda-developers.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.
Code:
adb remount
adb push openvpn /system/xbin/
adb shell
chmod +x /system/xbin/openvpn
exit
If " adb remount " didnt work
Code:
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
Code:
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
Code:
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
Code:
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
Code:
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
Code:
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.
Code:
username-as-common-name
plugin /usr/lib/openvpn/openvpn-auth-pam.so login
and this to your client
Code:
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
Out of curiosity, what is OpenVPN used for?
Then i will know if i have to use your spot on tutorial
no1male said:
Out of curiosity, what is OpenVPN used for?
Then i will know if i have to use your spot on tutorial
Click to expand...
Click to collapse
It's a VPN (virtual private network). I can access my home and work computers from my android.
I am super-impressed mero. But I wasn't able to get it to work .... I think it's my fault .... I've stuffed around so much. I'm right now starting a clean install.... It should work..... I hope.
Walker Street said:
I am super-impressed mero. But I wasn't able to get it to work .... I think it's my fault .... I've stuffed around so much. I'm right now starting a clean install.... It should work..... I hope.
Click to expand...
Click to collapse
thanks
I did alot of stuffing around aswell thats why i wanted to test it.
So i did a full wipe. then flash to 1.2 reboot. flash to 1.0.1.fix. and then first thing i did was follow those steps.
connection worked first go
please update me, as im sure i can help.
Walker Street,
I attached a screen shot of the actual adb session i did just incase. the bottom 3 commands to my knowledge and what i can see dont work so i ommited them from the tut. but they might do somthign and not display it so thought i might upload incase.
mero01 said:
Walker Street,
I attached a screen shot of the actual adb session i did just incase. the bottom 3 commands to my knowledge and what i can see dont work so i ommited them from the tut. but they might do somthign and not display it so thought i might upload incase.
Click to expand...
Click to collapse
Silly me. I forgot to set 'Fix HTC Routes'. Now I've done that and your method rules.
You're a genius mero. It works.
I changed permissions for the new openvpn and iptables using root explorer so they could execute. Maybe you didn't need to because you were doing adb push from linux (I was doing it from windows).
I don't have a DNS server, so I didn't need to specify one.
I would highly recommend these changes to LeeDroid for his rom. Have you messaged him yet?
Walker Street said:
Silly me. I forgot to set 'Fix HTC Routes'. Now I've done that and your method rules.
You're a genius mero. It works.
Click to expand...
Click to collapse
+1
Thank you very much
Walker Street said:
I changed permissions for the new openvpn and iptables using root explorer so they could execute. Maybe you didn't need to because you were doing adb push from linux (I was doing it from windows).
I don't have a DNS server, so I didn't need to specify one.
I would highly recommend these changes to LeeDroid for his rom. Have you messaged him yet?
Click to expand...
Click to collapse
to be honest the only part i did in adb was the symlinks did everything else in root explorer.i didnt change any permissions :S
Yes i have PM'd him, awaiting a reply
just updated to Buzz 1.0.2 , everything still works
Walker Street said:
It's a VPN (virtual private network). I can access my home and work computers from my android.
Click to expand...
Click to collapse
Yes and tunnel all your internet traffic back through the VPN encrypted in many ways
also works with buzz 1.0.8.
and after pushing the openvpn binary, you need to do chmod +x with it.
raw235 said:
also works with buzz 1.0.8.
and after pushing the openvpn binary, you need to do chmod +x with it.
Click to expand...
Click to collapse
No worries thanksss, i shall update
anyone tried with 1.1.0 ?
Hello,
i'm in trouble....
At first, i have an error when i try the adb remount command : Operation not permitted
Then i have a second message when i try to create the "bb" folder : mkdir failed for bb. Read-only file system.
I'm confused because tel is rooted, S-OFF and suped-CID. I even changed the Kernel with Buzz's one 1,2Ghz.
Did i miss something?
Thanks for your help
Lionel
EFCAugure said:
Hello,
i'm in trouble....
At first, i have an error when i try the adb remount command : Operation not permitted
Then i have a second message when i try to create the "bb" folder : mkdir failed for bb. Read-only file system.
I'm confused because tel is rooted, S-OFF and suped-CID. I even changed the Kernel with Buzz's one 1,2Ghz.
Did i miss something?
Thanks for your help
Lionel
Click to expand...
Click to collapse
hmm thats very strange... adb remount should work...
actually quite puzzled at that dunno why it wouldnt work if you do have root etc.
only other thing i can think of is have you got busybox installed ?
what state is your phone in when your trying to do this ? ie off. on, recovery mode.
Hi,
thanks for reply!
I have a branded SFR phone in France but i managed to root it and S-OFF it without problem.
I switched to another Kernel with the tun.ko file and that's all.
When i tried adb remount, the phone was ON (no recovery or anything else).
I will try in recovery mode.
Busybox is installed.
Note : impossible to connect adb while in recovery.
This seems to be the problem :
when switching kernel only, i don't change the property ro.secure because it's nested (of what i read) in the boot.img. I have a branded phone and this property is set to 1.
Is there a way to change this property without changing the whole ROM? I would llike to stay with this one.
Thanks for your advice
lionel
Ok,
switched to Leedroid 1.2 and re-changed kernel to Buzz 1,22Ghz.
This tutorial is awesome!
Thanks mero01!!!
Is there a way to use the WIFI connection instead of 3G?
EFCAugure said:
Ok,
switched to Leedroid 1.2 and re-changed kernel to Buzz 1,22Ghz.
This tutorial is awesome!
Thanks mero01!!!
Is there a way to use the WIFI connection instead of 3G?
Click to expand...
Click to collapse
no worries
yer just disable 3g and use wifi. just make sure that its not using the same wifi your openvpn server is on...
Yes, of course!
I will try from a friend's wifi this afternoon!
Thanks
lionel

OpenVPN on Defy

hello..
i've been trying to get openvpn to work on my Defy but no luck so far.
what i've done is:
-install busybox
-install openvpn settings and installer
-found my tun.ko
-copied my openvpn config to sdcard
-changed openvpn settings
-the vpn tunnel is created and connection is made but traffic doesnt seem to be routed to the tunnel
did anyone manage to get openvpn to work on Defy?
it was working fine for me for different android devices.
i used this tutorial:
hxxp://www.android-hilfe.de/root-hacking-modding-fuer-motorola-defy/58423-openvpn-auf-dem-defy-2.html
I use the phone's own VPN settings under Wireless & Networks and manage to get things working without any problems.
tim440 said:
I use the phone's own VPN settings under Wireless & Networks and manage to get things working without any problems.
Click to expand...
Click to collapse
this is for PPTP or IPSEC but not OpenVPN.
Ohhh.... Good i found this thread, maybe you guys will be able to help me...
I have a working VPN connection from for ex. my laptop > home (PPTP)
But i am unable to connect to it using Defy's original VPN connection...
I get:
"Unable to connect to the network. Do you want to try again?"
Also - what does mean this "DNS Search Domains " setting?
Darmach said:
Ohhh.... Good i found this thread, maybe you guys will be able to help me...
I have a working VPN connection from for ex. my laptop > home (PPTP)
But i am unable to connect to it using Defy's original VPN connection...
I get:
"Unable to connect to the network. Do you want to try again?"
Also - what does mean this "DNS Search Domains " setting?
Click to expand...
Click to collapse
what ROM are you using? on 2.2.1 L2TP works fine but not PPTP.
your options:
1. try L2TP or L2TP/IPSEC if your provider supports it
2. if your on a 2.1 ROM, try a 2.2.1 ROM
as for DNS search domains, you can put google's for example 8.8.8.8
or leave it blank if after connection is successful you can browse without problems.
Im on 2.1 - so its just that that on 2.1 PPTP is not working?
So DNS search domain are just specifying the DNS'es you will be using on this connection?
Darmach said:
Im on 2.1 - so its just that that on 2.1 PPTP is not working?
So DNS search domain are just specifying the DNS'es you will be using on this connection?
Click to expand...
Click to collapse
1. Yes, at least for me.
2. correct
does anyone here still need help with openvpn?
i managed to run openvpn through a dns tunnel over a public hotspot at the airport.
this works on most of the newer (hotspot)systems but is extremely slow.
i got it working, i will post the steps later on.
nolimitzz said:
i got it working, i will post the steps later on.
Click to expand...
Click to collapse
Hi,
Having the same issue as you.. My OpenVPN Connects but no unable to ping even the IP address.. Same Config ovpn file is working on previous phones. Please kind share you workaround . Thanks in advance
voided said:
Hi,
Having the same issue as you.. My OpenVPN Connects but no unable to ping even the IP address.. Same Config ovpn file is working on previous phones. Please kind share you workaround . Thanks in advance
Click to expand...
Click to collapse
Found the solution! here u go!
1. install openvpn-installer
2. Run openvpn-installer and during installation point to busybox (ifconfig/route) at at /system/xbin/bb
3. create the directory at /system/xbin/bb
Code:
mkdir /system/xbin/bb
4. Make symbolic links to ifconfig and route
Code:
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
enjoy~!
1) Install busybox using busybox installer from market, choose to install busybox in:
/system/bin
(dont install in /system/xbin , if already installed, please delete route and ifconfig in /system/xbin first very importanttttt)
Install Openvpn from Openvpn Installer in /system/xbin
using root explorer or whatever you use, replace openvpn binary with this:
http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
dont forget to change the permissions
using adb or terminal emulator:
Code:
su
mount -o rw,remount /dev/block/mmcblk1p21 /system
ln -s /system/bin/route /system/xbin/route
ln -s /system/bin/ifconfig /system/xbin/ifconfig
mkdir /system/xbin/bb
ln -s /system/xbin /system/xbin/bb
use openvpn settings to set your options (insmod for tun.ko, tun.ko location, openvpn location)
my main problem, which i dont know why, was because busybox is installed in system/xbin, while it should be installed in system/bin and then using symlink to system/xbin
anyway it works for me now, let me know if it does for you.
did you install busybox to /system/xbin/?
did you create /system/xbin/bb? and symlink route and ifconfig to that folder?
i hope you guys can post step by step tutorial here .. this is my first android phone ...
thanks !

[Q] OpenVPN on the Charge?

Dear All,
Does anyone have OpenVPN working on the Charge? I have PeanutButta Jelly Time which is suppose to have the tun.ko module in the kernel and lsmod gives me tun. however installing openvpn using the installer and settings does not work. I followed all the instruction including the push of openvpn2.1.1, sym linking of ifconfig and route, as well as various tun.ko files, but it fails to start. any thoughts?
Elviso
I am also interested in this
bump .. +1 .. anyone?
Please use the Q&A Forum for questions Thanks
Moving to Q&A
I finally got it working on mine. GummyCharged FE 2.0.
1) Install GummyCharge FE 2.0 ROM.
2) Install latest Imoseyon kernel. I don't think you need this since GC comes with the Imoseyon kernel #130 which should already have TUN support, but I upgraded mine anyway. After kernel upgrade mine was at #141. Link: http://rootzwiki.com/showthread.php...leanKernel-minimalistic-kernel-(v1.2.2-9-8-11)
3) Install Busybox.
4) Download bnred777's tun.ko from here: http://forum.xda-developers.com/showthread.php?t=1235410
5) Create a direcotyr called /system/lib/modules/ and /system/xbin/bb/
6) Copy tun.ko to /system/lib/modules/
7) Create a directory on your sdcard called /openvpn and copy all of your ovpn config and certificates there.
8) Install OpenVPN Installer from the market.
9) Run OpenVPN Installer and choose target directory of /system/xbin and /system/xbin/bb for ifconfig.
10) Create symlinks in the /system/xbin/bb/ directory:
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
11) Reboot your phone.
12) Run the following command from shell. You will have to run this every time you want to connect to your vpn. I would suggest making a shortcut shell script or there is probably a way to put it in start up.
insmod /system/lib/modules/tun.ko
13) Install OpenVPN Settings from the market. It should pick up your configuration settings from your sdcard/openvpn directory automatically.
14) Put in your password and you should be connected to your VPN.
The instructions are pretty much the same as other droid devices except for the Charge you need a Charge compiled tun.ko and getting the less finicky directories and symlinks took me a while to figure out. Here is a thread that helped me out with the directories and symlinks:
http://code.google.com/p/android-openvpn-installer/issues/detail?id=2

[Q] pppwidget on our tab??

Has anyone tested if it works on our tab or not....Plus does anyone know ho to find the power output of our tab's usb host mode????
I'll be geting my new usbotg cable soon so i'll also try n post the result....
For those who don't know about pppwidget, its a which allows you to use your 3G/2G stick(dongle) on your tab using the otg cable...
Market link
Read More about project here..
Hi thanks for this information, I tried this and it requires extra kernel modules (option, which is not included in cm10 kernel).
proudfoot said:
Hi thanks for this information, I tried this and it requires extra kernel modules (option, which is not included in cm10 kernel).
Click to expand...
Click to collapse
Can you please tell the steps you took and the result you got...This isn't supposed to need any modules except usb_modswitch which it already include....It works on CM10 nexus 7 too...Which dongle did you use???
Yup, it works it requires couple of modules not included in cm10 p5100 kernel, i already build the modules (see attachment) . Enjoy
I uses zte cdma modem, that modem requires 'option' module but most 3g/CDMA dongle uses this module.
You just need to copy those modules to /system/lib/modules.
edit: forgot to actually attaching the modules ~_~
Update: Vpn doesn't seem to work with pppwidget.
Update2: works, needs to manually set the gateway
cool...i'll get back to you in couple of days(waiting for my new otg cable)... can you please give the .c file for the modules also....still learning all this stuff so wlll be helpful....
kan_bleach said:
cool...i'll get back to you in couple of days(waiting for my new otg cable)... can you please give the .c file for the modules also....still learning all this stuff so wlll be helpful....
Click to expand...
Click to collapse
clone it from here -> https://github.com/cmenard/android_kernel_samsung_espresso10
as for compiling it follow/adapt from this tutorial -> http://stevechui.blogspot.com/2011/10/compiling-kernel-modules-tunko-for.html
Its giving 'port not found'....any solutions??
Did you directly connected the dongle to tab or used a powered hub???
kan_bleach said:
Its giving 'port not found'....any solutions??
Did you directly connected the dongle to tab or used a powered hub???
Click to expand...
Click to collapse
Directly, what the log (it should be in /sdcard/pppwidget/log/) say?
edit: actually with this -> http://www.amazon.com/Samsung-EPL-1PL0BEGXAR-USB-Connection-Kit/dp/B005518J6Q it's still count as directly right?
proudfoot said:
Directly, what the log (it should be in /sdcard/pppwidget/log/) say?
edit: actually with this -> http://www.amazon.com/Samsung-EPL-1PL0BEGXAR-USB-Connection-Kit/dp/B005518J6Q it's still count as directly right?
Click to expand...
Click to collapse
Yup that's direct
Checked the log...mod_switch successful, but loading option module fails...option.ko is in the correct folder..
I tried insmod but it says operation not permitted...
Tried su and then insmod but then it says failed (trying using terminal emulator)..
kan_bleach said:
Yup that's direct
Checked the log...mod_switch successful, but loading option module fails...option.ko is in the correct folder..
I tried insmod but it says operation not permitted...
Tried su and then insmod but then it says failed (trying using terminal emulator)..
Click to expand...
Click to collapse
Your option.ko probably not compatible with the kernel, try to do
Code:
strings option.ko | grep vermagic
uname -a
and compare both output, it should be similar.
also if you use insmod I think you'll need to insmod usb_wwan.ko first, because option.ko depends on that module, so it should be
Code:
insmod usb_wwan.ko
insmod option.ko
then, move the pppwidget to launcher and plug the dongle.
proudfoot said:
Your option.ko probably not compatible with the kernel, try to do
Code:
strings option.ko | grep vermagic
uname -a
and compare both output, it should be similar.
also if you use insmod I think you'll need to insmod usb_wwan.ko first, because option.ko depends on that module, so it should be
Code:
insmod usb_wwan.ko
insmod option.ko
then, move the pppwidget to launcher and plug the dongle.
Click to expand...
Click to collapse
Tried the command...output is the same...still not able to use insmod...
Log
Code:
USB_ModeSwitch log from Sat Oct 27 16:23:19 IST 2012
Raw args from udev: 1-1.4/1-1.4:1.0
Using top device dir /sys/bus/usb/devices/1-1.4
----------------
USB values from sysfs:
manufacturer ZTE, Incorporated
product USB Storage
serial 000000000002
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /data/data/de.draisberghof.pppwidget/app_tmp/19d2.fff5
! matched. Reading config data
config: TargetVendor set to 19d2
config: TargetProductList set to fff1,fffe,ffff
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Logger is: /system/bin/log
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 14 -v 19d2 -p fff5 -f $configBuffer
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.4 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0xfff5
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="fff1,fffe,ffff"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 001/014 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 19d2:fff5
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x0a (out) and 0x89 (in)
USB description data (for identification)
-------------------------
Manufacturer: ZTE, Incorporated
Product: USB Storage
Serial No.: 000000000002
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x0a for message sending ...
Trying to send message 1 to endpoint 0x0a ...
OK, message successfully sent
Resetting response endpoint 0x89
Resetting message endpoint 0x0a
Could not reset endpoint (probably harmless): -34
Device is gone, skipping any further commands
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
Waiting for device file system (1 sec.) ...
Reading attributes ...
All attributes matched
Mode switching was successful, found 19d2:fff1 (ZTE, Incorporated: ZTE CDMA Tech)
Now checking for bound driver ...
No driver has bound to interface 0
Module loader is /system/bin/insmod
Trying to find module "option"
Have you try to insert those modules manually first, before running pppwidget and plug-in the dongle? I think we use the same dongle, so it should works ~_~
anyway this is how i get this to work:
1. create directory /data/loca/modules/ on tab
2. move all those modules (option.ko, usb_wwan.ko, ppp_async.ko) to this directory.
3. su and insmod all those modules:
Code:
insmod /data/local/modules/usb_wwan.ko
insmod /data/local/modules/option.ko
insmod /data/local/modules/ppp_async.ko
5. move pppwidget to launcher and plug the dongle.
optional:
create this script and put it in /data/local/userinit.d/93loadmod directory
Code:
#!/system/bin/sh
/system/bin/insmod /data/local/modules/usb_wwan.ko
/system/bin/insmod /data/local/modules/option.ko
/system/bin/insmod /data/local/modules/ppp_async.ko
so it will load all those modules at boot time.
I am doing the same thing...but insmod is giving error
When i run the insmod command i get
insmod: init_module 'usb_wwan.ko' failed(Exec format error)
kan_bleach said:
insmod: init_module 'usb_wwan.ko' failed(Exec format error)
Click to expand...
Click to collapse
From a bit of googling it looks like your module is not build for your kernel (or even build for wrong architecture), what is your kernel? and where do you get the modules, do you compile it yourself or is it from somebody else?
try to do dmesg after you do insmod to see more information.
btw, the module that i have posted only works for p5100 and cm10 kernel (3.0.8-CM-g11fad65)
proudfoot said:
From a bit of googling it looks like your module is not build for your kernel (or even build for wrong architecture), what is your kernel? and where do you get the modules, do you compile it yourself or is it from somebody else?
try to do dmesg after you do insmod to see more information.
btw, the module that i have posted only works for p5100 and cm10 kernel (3.0.8-CM-g11fad65)
Click to expand...
Click to collapse
I used the modules you posted...I am using CMOC-10 kernel....Maybe that is the issue...But the kernels are supposed to be identical except for the OC and the governors feature...i am on 3.0.8-CM-gbd034d0
kan_bleach said:
gbd034d0
Click to expand...
Click to collapse
Yup that the problem, it needs to have the same extra version number even though it comes from same source. I guess I could compile it for you.
proudfoot said:
Yup that the problem, it needs to have the same extra version number even though it comes from same source. I guess I could compile it for you.
Click to expand...
Click to collapse
Please do...
kan_bleach said:
Please do...
Click to expand...
Click to collapse
Here, I hope it works because it comes from cm10 source, I only change the extra version to match yours.
proudfoot said:
Here, I hope it works because it comes from cm10 source, I only change the extra version to match yours.
Click to expand...
Click to collapse
Thanks i'll try and post the result...can you give me the github link for the cm10 kernal for our tab???

Categories

Resources