Jump to content

OpenVPN on Paul's Froyo Custom ROM


Recommended Posts

Guest yazooo
Posted

Hate having to start a new topic for this, but I have searched a fait bit and can't seem to find the answers. Firstly, does anyway have open vpn succesfully running on these roms...

If so, how?!

I have openvpn settings installed, path to binary and tun module look fine, looading it with insmod. My configs are in, but when I press to connect to them nothing happens. I used the openvpn installer and settings from the market...?

Any tips greatly appreciated as standard vpn doesn't work for me!

Guest spammyspam
Posted

Install connectbot, run openvpn --config <config> via that and see what your error is.

Guest yazooo
Posted

hmmm, navigated to system/bin, ran the command but just get failed to link openvpn

Guest spammyspam
Posted

What error did you actually get on screen?

Guest yumbelie
Posted
hmmm, navigated to system/bin, ran the command but just get failed to link openvpn

Something else to try (for debugging the error) is to connect the phone to your PC and fire up "adb logcat" command from the tools folder in the Android SDK. When the OpenVPN interface attempts to come up, it'll splurge out all the info to your PC's console window allowing you to see what the error is.

Guest yazooo
Posted

from the adb log

W/InputManagerService( 150): Window already focused, ignoring focus gain of: co

m.android.internal.view.IInputMethodClient$Stub$Proxy@45444f70

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stderr( 838)

: link_image[1995]: failed to link /system/bin/openvpn

D/OpenVPN-Settings( 838): onResume()

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stderr( 838)

: CANNOT LINK EXECUTABLE

I/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 838)

: terminated

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stderr( 838)

: └Ç

I/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stderr( 838)

: terminated

D/OpenVPNDaemonEnabler( 838): Received OpenVPN daemon state changed from Unknow

n to Disabled

D/dalvikvm( 321): GC_EXPLICIT freed 744 objects / 36408 bytes in 73ms

D/dalvikvm( 363): GC_EXPLICIT freed 1164 objects / 66000 bytes in 63ms

D/dalvikvm( 608): GC_EXPLICIT freed 278 objects / 13936 bytes in 77ms

D/dalvikvm( 661): GC_EXPLICIT freed 2476 objects / 162640 bytes in 70ms

D/dalvikvm( 1668): GC_EXPLICIT freed 2992 objects / 135416 bytes in 71ms

I/power ( 150): *** set_screen_state 0

D/OpenVPN-Settings( 838): onPause()

D/SurfaceFlinger( 150): About to give-up screen, flinger = 0x122e90

D/AK8973 ( 130): Compass CLOSE

I guess the failed to link to openvpn is the problem, but not sure how to fix it. Have installed it to xbin as well, and tried that but no joy.

Guest yazooo
Posted

yeah, so when i run openvpn from connectbot it says

link_image[1995]: failed to link openvpn

CANNOT LINK EXECUTABLE

the hunt continues for what is going on!

Guest yazooo
Posted

If someone could tell me who is on one of the custom Froyo rom's what they did exactly from the moment they flashed their rom to running openvpn it would be greatly appreciated as this is doing my head in!

Cheers

Guest MIYU-G
Posted

almost all paul's desire custom rom fail to use openvpn,I don't know why,it's not the first time,he even don't wannna fix it... :lol:

Guest Diaboliq
Posted
If someone could tell me who is on one of the custom Froyo rom's what they did exactly from the moment they flashed their rom to running openvpn it would be greatly appreciated as this is doing my head in!

Cheers

I just did a risk free root on my Desire.

Then i did a fake-flash install and afterwards i used the Froyo with additions rom.

Afterwards i just downloaded the most recent vpn connections http://code.google.com/p/get-a-robot-vpnc/ V099.

Using adb shell i ran a find -iname tun.ko to find the module and then used insmod on the path/file it gave me.

Afterwards vpn connections worked like a charm.

Only problem i now face is that when using this VPN i have to set a http proxy for my applications/web browser which apparently isnt that easy in Android (Now how the hell do you miss something like this? Lol).

Guest zacbri
Posted
yeah, so when i run openvpn from connectbot it says

link_image[1995]: failed to link openvpn

CANNOT LINK EXECUTABLE

the hunt continues for what is going on!

Hi all,

I'm facing the same issue.

I've rooted my device (HTC desire) and flashed it with Modaco's Froyo ROM. No problem with this and nice work by the way...!

I've then used the instructions in the 2nd post of this thread http://android.modaco.com/content/software...vpn-on-android/ to get openvpn working (since /system is not writable from the phone itself on the HTC desire).

Insmod the tun module works fine, but when trying to run the openvpn binary, as root, from the terminal I get the error above.

Note that I'm using the stock libcrypto.so and libssl.so as the system wouldn't boot with the ones provided in android-external-openvpn package

So I guess there might be a mismatch between the binaries and the libs, but the error doesn't give more indications than "failed to link openvpn"

Paul (or anyone else), would you have any suggestion as to what step I could take next?

Cheers

Guest yazooo
Posted

Thanks Diaboliq, will have a try with what you did.

Guest yazooo
Posted

Looks like that is for Cisco VPN...is that not a bit different?

Guest yazooo
Posted

just tried defrost 2.0c and it tried to connect straight away which is a huge improvement. it fails on the get config bit, just after i put in my user/pass so time to hunt for that problem now!

Guest yazooo
Posted

======> 0 == 2 resetting dns, leaving dns alone

D/OpenVPNDaemonEnabler( 438): Received OpenVPN network state changed from Auth

to Get Config

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-mgmt( 438): SUCCESS

: bytecount interval changed

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: Mon Jul 12 20:02:16 2010 SENT CONTROL [hideipvpn.com]: 'PUSH_REQUEST' (status=

1)

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: Mon Jul 12 20:02:17 2010 AUTH: Received AUTH_FAILED control message

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: Mon Jul 12 20:02:17 2010 TCP/UDP: Closing socket

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: Mon Jul 12 20:02:17 2010 SIGTERM[soft,auth-failure] received, process exiting

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: Mon Jul 12 20:02:17 2010 MANAGEMENT: >STATE:1278957737,EXITING,auth-failure,,

V/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-mgmt( 438): onState

(">STATE:1278957737,EXITING,auth-failure,,")

I/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stdout( 438)

: terminated

I/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-daemon-stderr( 438)

: terminated

D/OpenVPN-Settings-getprop( 438): invoking external process: /system/bin/sh

D/OpenVPN-Settings-getprop-stdout( 438): 2

I/OpenVPN-Settings-getprop-stderr( 438): terminated

I/OpenVPN-Settings-getprop-stdout( 438): terminated

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-mgmt( 438): =======

======> 0 == 2 resetting dns, leaving dns alone

D/OpenVPNDaemonEnabler( 438): Received OpenVPN network state changed from Get C

onfig to Exiting

D/OpenVPN-DaemonMonitor[/sdcard/openvpn/HideIpVPN-UK2.ovpn]-mgmt( 438): termina

ted

D/OpenVPNDaemonEnabler( 438): Received OpenVPN daemon state changed from Unknow

n to Disabled

Part of the log where it goes wrong...hmmm...no idea!

Guest yazooo
Posted

ok - working over wifi now! not on 3g though...it connects and gets and ip, but no pages load. am thinking maybe my provider blocks vpn...willl try and find out!

  • 5 weeks later...
Guest fatwolf
Posted

I Have been having weird issues with the built in openvpn as well.

I can connect no issue.

IP's assigned no problem

However the phone does not seem to want to use the vpn for things.

Its almost like the phone is ignoring the routing table.

if a just the other side of the vpn

# ping 10.10.11.1

the trafic goes out via the rmnet0 device and does not go anywhere

If i ping forcing the interface

# ping -I vpn 10.10.11.1

Works perfectly

I can even ping items on the remote sid of the vpn.

Anyone having similar issues.

I used to use the r3.1 version and there was no problem at all.

Its not like the tunnel is not up and running if you force a ping using the interface no problem at all.

Could there be something on the phone that overwrites the routing? or could the tun/vpn software be older that it doesn't respect routing with busybox?

Guest fatwolf
Posted

Unfortunately that doesn't seem to solve my issue.

I do not have a route entry for my vpn servers internet IP.

my routing table only contains the routes to the vpn internal endpoints and other networks behind my vpn.

Anything staticly set in the routing table should take priority over default but it just does not want to.

I wonder if adjusting the metric of the default route would resolve the issue.

Guest Tha_Dogg
Posted
Unfortunately that doesn't seem to solve my issue.

I do not have a route entry for my vpn servers internet IP.

my routing table only contains the routes to the vpn internal endpoints and other networks behind my vpn.

Anything staticly set in the routing table should take priority over default but it just does not want to.

I wonder if adjusting the metric of the default route would resolve the issue.

Hello :D

Same problem here, every "ip ro get" on my local subnet that can do will only return the default 3g gateway instead of the openvpn server private address.

Everythings looks fine, but :

# ip ro

192.168.40.1 via 192.168.40.5 dev tun0

192.168.40.5 dev tun0 proto kernel scope link src 192.168.40.6

195.115.25.129 via <RMNET0_GATEWAY> dev rmnet0

172.20.0.0/16 <RMNET0_GATEWAY> dev rmnet0

default via 192.168.40.5 dev tun0

# ip ro ge 192.168.0.254

192.168.0.254 via <RMNET0_GATEWAY> dev rmnet0 src <RMNET0_ADDRESS>

cache mtu 1500 advmss 1460 hoplimit 64

#

195.115.25.129 being the SFR (Vodafone) Proxy for the "Illimythics classic" plan.

Guest Tha_Dogg
Posted
Hello :D

Same problem here, every "ip ro get" on my local subnet that can do will only return the default 3g gateway instead of the openvpn server private address.

Everythings looks fine, but :

# ip ro

192.168.40.1 via 192.168.40.5 dev tun0

192.168.40.5 dev tun0 proto kernel scope link src 192.168.40.6

195.115.25.129 via <RMNET0_GATEWAY> dev rmnet0

172.20.0.0/16 <RMNET0_GATEWAY> dev rmnet0

default via 192.168.40.5 dev tun0

# ip ro ge 192.168.0.254

192.168.0.254 via <RMNET0_GATEWAY> dev rmnet0 src <RMNET0_ADDRESS>

cache mtu 1500 advmss 1460 hoplimit 64

#

195.115.25.129 being the SFR (Vodafone) Proxy for the "Illimythics classic" plan.

Ok I think i've found the problem.

The system is using the wrong table for traffic routing :

# ip ru show

0: from all lookup local

3002: from all lookup gprs

32766: from all lookup main

32767: from all lookup default

in the table "gprs", the wrong gateway appears and it looks like it has the priority.

I'll go more into it tonight hopefully. You can have a look at it using this command : ip ro list table gprs

Posted (edited)

Here is update.

I create package but main content is from linxtx ()

No busybox is needed, openvpn binary use "ip" command.

Copy to sdcard and with ROM Manager Flash ROM from sdcard.

Package contain /system/lib/modules/tun.ko, /system/xbin/openvpn and /system/xbin/openvpn-iproute-wrapper.sh

With iproute wrapper is all routes added/deleted to/from vpn table.

Tested with Android OpenVPN settings on PAUL stock desire froyo ROM without bootloader. It working with no compromise!

NOTE: you need to add to .ovpn config files next line to use iproute wrapper:

iproute /system/xbin/openvpn-iproute-wrapper.sh

NOTE2: I'm very sorry, but I upload here another package with wrong tun.ko version. Now it is fixed. If you already apply previous version, you probably in recovery mode need to overwrite /system/lib/modules/tun.ko with one from this package. Or you can try root explorer if you have it and it is working for you.

openvpnupdatedesire_iproute_2.6.32.15_gf9c0527_signed.zip

Edited by luboz

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.