Android OpenVPN

Search This thread

cvandeplas

Member
Aug 23, 2009
6
0
Since I bought my HTC Hero two weeks ago I can't stop enjoing the device.
Except one thing: Currently no OpenVPN client exists yet for the Android platform.

While searching Google I could find people referring to successfull ports of openvpn, but all discussions were vague and all links were dead.


This resulted in the motivation to work on making openvpn available on Android.
For the last weeks I have been reading documentation and already started coding a very basic GUI. (listing and editing configuration files)

Being fairly novice to Android, and expecting I'm not the only one envying such functionality I am starting a Call for Participation trying to reach other developers interested to work on the project.

As structure of this application I see the following parts:
1) GUI stuff to manage configurations (view, create, edit and delete). Tunnel management (connect, disconnect, view log, view ip) would also be done here. (language: java)
2) background daemon sending notifications about the tunnel state (don't know if that's necessary) (language: java)
3) ported openvpn client that parses the config and does the real work. (language: c)

It looks like other projects already provide the necessary tun kernel drivers. Rooting your device will be necessary to be able to load the driver.

Being supportive to open source software I'd like to keep the code open.
Discussions about selling the (compiled) GUI on the Market are possible.


Interested developers can reply here or contact me at [email protected].


Some interesting links:
http://openvpn.net/index.php/open-source/downloads.html
http://developer.android.com/sdk/ndk/1.5_r1/index.html
http://code.google.com/p/get-a-robot-vpnc/

Posted on xda-developers and MoDaCo.
 

stickman

Senior Member
Jun 11, 2005
85
0
I saw one being developed in Singapore.
I think its featured by the codeandroid.org community.

Its in the Marketplace now, I guess?

Searched for it in the SG App directory and couldn't find it there.

It doesn't show up either in the US Market. Could you please attach an apk for it?
 

ngomo

New member
Feb 9, 2009
1
0
is there any reason why the monitor application does not work ?

ive installed openvpn successfully but the monitor application is just a black in black layout ?


ng
 

rgawenda

Senior Member
Jul 28, 2009
343
102
Allariz
Hi.

I've installed both openvpn and Openvpn-Monitor.apk.
Monitor opens, but there is no way to configure vpn. I've tried to import a valid config file from my linux box but monitor says it's not a valid config file.

Been there. The Monitor doesn't even allow me to import a valid config. Save button is never enabled, but I've got the vpn up and running well from the command line.
 

[email protected]

New member
Oct 10, 2009
1
0
Been there. The Monitor doesn't even allow me to import a valid config. Save button is never enabled, but I've got the vpn up and running well from the command line.

I haven't gotten it to work yet, still just a black screen for me also but I found out it connects to 127.0.0.1 7890 which I assume is supposed to be the management interface of openvpn.

I added "management 127.0.0.1 7890" to my openvpn config and can se the monitor app talking to it but still the black screen.

Just thought I should share it, perhaps someone else will figure out the next step in getting this working.
 

teknologist

Member
Jul 14, 2007
34
9
Force closes on hero when hitting find to import config file

title says it all ...have installed the libs/bin in /system/lib and /system/bin (actually I already had libssl and libcrypto)

installed the monitor apk and everytime I got to settings import file -> Find the app force closes.. :-(

Can anyone help ?
 

ChefCB

New member
Oct 23, 2007
1
0
OpenVPN GUI

the VPNMonitor even not works for me, it crashed if i'm trying to import a config file.
I wrote my own OpenVPN GUI and for about 4 hours it's on the android market.
More informations about it can be found on my page at http://www.blank-online.eu/android/openvpn_gui/

unfortunately my page only is in german so I'll give a short summary:

it asks you to download openvpn binary file incl. tun.ko module if needed.
then it may does a wget and chmod and ln -s (because of ifconfig and route)
You can edit the path to your openvpn file
yout can set the path where your configfiles are
and easily start/stop openvpn connections via checkboxes...

i think it became a very nice app :)
i love it :)

i'm looking forward to your feedback!!
 

cvandeplas

Member
Aug 23, 2009
6
0
Another discussion about this is going-on on MoDaCo.
http://android.modaco.com/content/software/291919/openvpn-on-android/

I also have released an OpenVPN GUI for Android.
The the code is completely opensource, so you can check that I added no backdoors, or you could help fixing bugs by sending patches ;-)

The application can currently:
- Create and edit configurations
- Connect / Disconnect
- View log and share it ( send by email or other means )
- tunnel notification/status in system tray

I am currently working on the implementation of a password prompt for certificate authentication and user/password authentication.
My goal is to release this feature in a week or so.

You can find a README and the openvpn binaries here: https://sourceforge.net/projects/tunneldroid/files/
(these binaries don't require the ugly 'bb' symlinks that the others published on Git do need (http://github.com/fries/android-external-openvpn)

TunnelDroid is published on the Android Market.
So just do a simple search for it. This will help you to follow the updates.

Please give feedback if it works/doesn't work on your phone.
 

blackplatypus

Senior Member
Jan 22, 2008
130
23
If I start an openvpn connection via shell (using my config file) it works, however with your tool it starts to connect and it even establishes a connection, but only a few seconds later it disconnects with the following error:

event_wait_interrupted system call (code=4)
TCP/UDP: Closing socket
SIGTERM[hard] received, process exiting
 
Last edited:

SalvoB

New member
Sep 22, 2009
2
0
If I start an openvpn connection via shell (using my config file) it works, however with your tool it starts to connect and it even establishes a connection, but only a few seconds later it disconnects with the following error:

event_wait_interrupted system call (code=4)
TCP/UDP: Closing socket
SIGTERM[hard] received, process exiting

I have the same problem.

lastConnection.log:
Code:
Thu Nov 12 17:17:37 2009 OpenVPN 2.1_rc15 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Nov  1 2009
Thu Nov 12 17:17:37 2009 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Nov 12 17:17:37 2009 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Nov 12 17:17:37 2009 WARNING: file '/sdcard/openvpn/client.key' is group or others accessible
Thu Nov 12 17:17:37 2009 LZO compression initialized
Thu Nov 12 17:17:37 2009 Attempting to establish TCP connection with xx.xx.xx.xx:9000 [nonblock]
Thu Nov 12 17:17:38 2009 TCP connection established with xx.xx.xx.xx:9000
Thu Nov 12 17:17:38 2009 TCPv4_CLIENT link local: [undef]
Thu Nov 12 17:17:38 2009 TCPv4_CLIENT link remote: xx.xx.xx.xx:9000
Thu Nov 12 17:17:57 2009 [server] Peer Connection Initiated with xx.xx.xx.xx:9000
Thu Nov 12 17:17:59 2009 event_wait : Interrupted system call (code=4)
Thu Nov 12 17:17:59 2009 SIGTERM[hard,] received, process exiting
 

cvandeplas

Member
Aug 23, 2009
6
0
To prevent freezing your phone when openvpn fails to connect I implemented a 30 seconds connection timeout. (line 97 from the source )
TunnelDroid detects you are connected once the tun0 interface came up.
This will probably be where it has issues on your device.

Could you give me a directory listing of your /sys/class/net/ directory once the tunnel came up?
Once I get the info I'll upload a fixed version.

The good news is that I'm currently implementing openvpn-manager support. This means TunnelDroid will be able to interact with openvpn while it runs in the background and will be able to ask openvpn if he's connected.

The technical stuff on the side this means the following new features:
- prompt for certificate credentials
- prompt for auth credentials
- displaying the status of the connection (CONNECTING,WAIT,AUTH, GET_CONFIG, ASSIGN_IP, ADD_ROUTES, CONNECTED, RECONNECTING, EXITING)
- and probably other things ...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi,

    I successfully connected to the VPN server. However the tap doesn't seems to retrieve the IP address from the DHCP at the server. So, every time I connect to the VPN, I'll need to manually refresh the tap device ip manually by running "netcfg tap0 dhcp" using Terminal.

    I tried putting in this line in the conf file,
    Code:
    up "netcfg tap0 dhcp"

    but it doesn't run.

    Any help would be greatly appreciated.
    1
    does any one know...how to save the Username and password in OpenVPN ?..
    Am using OpenVPN in CM7 nightly

    just create a file named 'pass.txt' then enter your username and password like this:

    John
    1234

    place the file inside the same folder with config

    then on your config, add this line:

    auth-user-pass pass.txt

    I hope that might help :)
    1
    Contact senior devlopers....

    Dont forget hitting thanks......
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone