• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

VPNC on android

Search This thread

Ungamedplayer

Member
May 4, 2009
27
2
Introduction

This is the first release of an installable package to allow google android phones to connect to Cisco like VPN concentrators.
Details

The installing phone will require:

* Root user privileges on the phone.
* /dev/tun file
* Kernel with tun support (or tun module). (cyanogen should be good)
* A cisco, nortel or freeswan ipsec server to connect to.

How To
Installing this version

This is available in the android market as a free application. It should be called VPN Connections. (Not sure where it will be listed as yet).

The latest version of the application can also be downloaded from here and installed using adb.
Reporting bugs

Please inform us which ROM and version that you are using, if the /dev/tun exists, its permissions, and the output of logcat from a boot, also the version of this application that you are running.

If your ROM and version are already reported in the issue list, please comment in the thread as there has been some inconsistencies in reports.

Please be very careful when lodging a bug as it may contain company confidential information. Be sure to strip any secrets or passwords from the configuration files or debugging information.

http://code.google.com/p/get-a-robot-vpnc/issues/list
Known issues

May need to load the tun module manually first.
Usernames can not contain the @ symbol.
Does not currently work with one time pass devices (Rsa keys).
 
Last edited:

Ungamedplayer

Member
May 4, 2009
27
2
I'm not trying to ping via DNS name, so dont be worred about that. I know the other hosts are up, reachable and pingable.

Tried TCP and ICMP connections.
 

Saiboogu

Senior Member
Apr 28, 2009
305
5
Frostburg MD
Unfortunately I don't have any ideas for you.. I'd like to play with it some myself though, would love to have VPN working. Could you send me / post the compiled binaries? saiboogu [at] g mail

Thanks and good luck
 

Ungamedplayer

Member
May 4, 2009
27
2
A little more information.

When tcpdumping the connection, packets originating from the phone go out through the device.
When tcpdumping the connnection with packets originating from the internal network through the vpn, i can tell they make it to the rmnet0 device, but never make it to tun0 device.
 

Ungamedplayer

Member
May 4, 2009
27
2
Ok, so I have it working now ! Wahoo.

So.. going to tidy the code up, Clean up the shell script to be android specific (and set the DNS servers).
 

P3TR

Member
Nov 18, 2007
12
0
Great. Would be awesome if you could share your binaries. What about joining this project and submitting what you did?
 

Ungamedplayer

Member
May 4, 2009
27
2
I'm going to try to get a build environment setup for the major releases. Please PM me within the next 7 days if you are interested.

I plan to not only release the binaries, but the source code and build environment also. Hopefully the upstream developers will also take my patches.
 

N23

Senior Member
Mar 29, 2007
180
22
Is it possible to connect with this vpnc to a cisco concentrator 3000 vpn?

We use CiscoVPN at our University and it would be nice if Android will be able to connect to it.
 

Saiboogu

Senior Member
Apr 28, 2009
305
5
Frostburg MD
Is it possible to connect with this vpnc to a cisco concentrator 3000 vpn?

We use CiscoVPN at our University and it would be nice if Android will be able to connect to it.

I got a copy of this a few days ago from ungamed.. At first I couldn't connect to our 3000 because I was lead to believe our concentrator only supported TCP NAT traversal (which isn't supported by vpnc), but after talking to someone who knew his stuff a little better, I connected via UDP and had no problems.

So, short answer -- as long as your concentrator is configured to accept some form of NAT traversal other than TCP, this should work.

Oh, and like ungamed said the DNS still needs some work. Not a problem for me, when I VPN to work I only need a single domain that I went ahead and put in my /etc/hosts
 

Ungamedplayer

Member
May 4, 2009
27
2
It only works with Cupcake? That's bad because yet there's no (fully working) UK Cupecake out :(

But thank you very much! Maybe then the nice GUI is ready ;-)

Working on the interface is slower than me doing the actual port.


Thumbnail::
th_updated-now.png

Full Shot Preview
 
Last edited:

Phlogiston

Senior Member
Nov 5, 2008
111
0
I tried to use that package :)

I can get vpn connecting, but the apps do not use that tunnel afterwards.
Code:
# ./vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --debug 1 --no-detach

vpnc version ERSION
Script: not found
IKE: not found
Perfect: not found
IPSec: not found
IPSec: not found
IPSec: not found
Xauth: not found
Xauth: not found
IKE SA selected psk+xauth-aes128-sha1
NAT status: no NAT-T VID seen
got address *************
Script: not found
IKE: not found
Perfect: not found
IPSec: not found
IPSec: not found
IPSec: not found
Xauth: not found
Xauth: not found
IPSEC SA selected aes128-sha1
VPNC started in foreground...
vpnc[2366]: can't open pidfile /var/run/vpnc/pid for writing

Do I need to call something afterwards?

Btw it did not work to pass --script to /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script so I copied that script to the default location /etc/vpnc/vpnc-script...
maybe its not executed properly?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Introduction

    This is the first release of an installable package to allow google android phones to connect to Cisco like VPN concentrators.
    Details

    The installing phone will require:

    * Root user privileges on the phone.
    * /dev/tun file
    * Kernel with tun support (or tun module). (cyanogen should be good)
    * A cisco, nortel or freeswan ipsec server to connect to.

    How To
    Installing this version

    This is available in the android market as a free application. It should be called VPN Connections. (Not sure where it will be listed as yet).

    The latest version of the application can also be downloaded from here and installed using adb.
    Reporting bugs

    Please inform us which ROM and version that you are using, if the /dev/tun exists, its permissions, and the output of logcat from a boot, also the version of this application that you are running.

    If your ROM and version are already reported in the issue list, please comment in the thread as there has been some inconsistencies in reports.

    Please be very careful when lodging a bug as it may contain company confidential information. Be sure to strip any secrets or passwords from the configuration files or debugging information.

    http://code.google.com/p/get-a-robot-vpnc/issues/list
    Known issues

    May need to load the tun module manually first.
    Usernames can not contain the @ symbol.
    Does not currently work with one time pass devices (Rsa keys).
    1
    vpn connects, but apps still use eth0

    Hello!

    I tried VPNC, and it looks like it can connect to the company VPN, tun0 has a correct IP address, routing is in place (looking with route -n), everything looks fine, but if i traceroute to an IP inside the company LAN, it wants to go through eth0.

    Code:
    vpnc version ERSION
    IKE SA selected psk+xauth-aes128-sha1
    NAT status: this end behind NAT? YES -- remote end behind NAT? no
    got address 9.12.227.234
    backing up dns and resolve.conf
    cp: can't stat '/etc/resolv.conf': No such file or directory
    vpnc-script ran to completion
    IPSEC SA selected aes256-sha1
    VPNC started in foreground...

    That resolve.conf error does nothing to do with issue, or ?

    Pinging a company network IP with ping -I tun0 works!
    So it seems i'm really connected, there is only an issu with the routing... :(

    Can you please help me with this ? I really would like to make this work, but i'm stuck here....



    SOLVED: I found this: ip ru del table wifi (if i'm on wifi) This deletes the routing table of the wifi, which is before the local table, so that was used. When i delete it, everything works, even DNS (which was a big surprise :D )
    To set back the old routing settings, turn on and then off the airplane mode.