Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,969 Members 37,842 Now Online
XDA Developers Android and Mobile Development Forum

Openvpn

Tip us?
 
rweb
Old
#1  
Member - OP
Thanks Meter 9
Posts: 99
Join Date: Mar 2008
Default Openvpn

One of the top reasons I wished root was openvpn. Anybody knows about working binary and TUN/TAP driver for D3? If yes, it could save me time, if not I'll build it over the weekend. TIA.
 
leobg
Old
#2  
Senior Member
Thanks Meter 132
Posts: 1,322
Join Date: Mar 2006
Since the sources are available, we just need somebody bright enough to compile the module against those sources. I am sure it is coming shortly. That's the sole reason I would use root too.
leobg
 
rweb
Old
#3  
Member - OP
Thanks Meter 9
Posts: 99
Join Date: Mar 2008
Not a big problem, I'll do it later.
 
Darksurf
Old
#4  
Senior Member
Thanks Meter 8
Posts: 208
Join Date: Mar 2010
Even if you built the driver using the moto source code, I don't know if you could inject the driver into the kernel area anyway. I'm pretty new to Moto Android, but doesn't the locked bootloader prevent tampering with the kernel?
 
rweb
Old
#5  
Member - OP
Thanks Meter 9
Posts: 99
Join Date: Mar 2008
You only need to be root to load kernel modules. It's not a new kernel.
 
Darksurf
Old
#6  
Senior Member
Thanks Meter 8
Posts: 208
Join Date: Mar 2010
I see, so you plan on loading the module manually every time? what a pain. I guess its a small cost compared to the alternative.
 
neonerz
Old
#7  
Junior Member
Thanks Meter 2
Posts: 27
Join Date: Mar 2010
If you use OpenVPN Settings, it will load the kernel module for you.

I must say though, Motorola did a good job expanding on Android's VPN support. I was able to connect to my IPSEC VPN, stock, unlike every other Android phone I've had.
 
limaxray
Old
#8  
Member
Thanks Meter 11
Posts: 64
Join Date: Aug 2008
It looks like the tun driver is built into the stock kernel. I built the kernel from Moto's source and in its .config, tun is set to be compiled in the kernel.

So to verify this, I installed the openvpn binaries using OpenVPN Installer from the market and tried giving it a whirl. It connected and created a tun device, but failed on running ifconfig and route. Not sure where its pulling these bins from, but links in both bin and xbin point to busybox.

I can configure tun0 and the routing table manually and successfully pass traffic through the tunnel. This isn't ideal, so I'd like to find out why openvpn is unable to use these tools. Any ideas?
The Following User Says Thank You to limaxray For This Useful Post: [ Click to Expand ]
 
rweb
Old
#9  
Member - OP
Thanks Meter 9
Posts: 99
Join Date: Mar 2008
First thanks, you are right, tun/tap is built-in. I wouldn't have expected this.
Second, could you please point me to .config? I must be blind, I cannot find it.

I see the strange behaviour as you. However it doesnt't bother me much, because I write a start script anyway.
I can only imagine there is something wrong with the binary of OpenVPN Installer. I found a hint to this:
http://code.google.com/p/android-ope...es/detail?id=2
However I tried the workaround with the symlink to /system/xbin/bb, it didn't work neither.
 
limaxray
Old
#10  
Member
Thanks Meter 11
Posts: 64
Join Date: Aug 2008
It is surprising to see tun built in - I wonder if they were considering adding OpenVPN support out of the box.

You're probably right that there's something wrong with the OpenVPN Installer binaries. I made a script in GScript for the time being, but prefer using OpenVPN Settings.

.config is nowhere to be found, but it is generated when the Moto kernel source is built. Now I'm assuming this is the same config used on the prod device, but that's a pretty big assumption.

Anyway, see attached. It sure is odd I can't attach a gzipped tarball on a forum focused on Linux development.
Attached Files
File Type: zip config.zip - [Click for QR Code] (16.8 KB, 29 views)

The Following User Says Thank You to limaxray For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Schedule is up for xda:devcon ’14

With xda:devcon ’14 just around the corner, and the venue close to selling out, there is a lot … more

aLogcat Returns Thanks to XDA Love

The developers of Android, that is Google, gave users several great debugging tools that can be used in … more

And the Winners in the XDA Pebble Development Challenge Are…

Almost two months ago, we set out with Pebble to findthree amazing … more

MediaTek Releases Full Kernel Source for First Android One Devices

Those who might have thought that MediaTek wouldnever release working … more