yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Ungamedplayer:
Just wondering, do you know if the same internal servers work when resolving external DNS from inside the network ?
[G1 Android Development] mlevin:
Everything seemed to be going fine and then I got this:

# /data/data/org.codeandroid.vpnc/bin/vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --script /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script --no-detach --debug 1
/data/data/org.codeandroid.vpnc/bin/vpnc was built without openssl: Can't do hybrid or cert mode.
#

Any suggestions?

EDIT: Ok, got a lot further. Commented out the "IKE authmode hybrid" line as I read somewhere when using Cisco, and then I got this:

# /data/data/org.codeandroid.vpnc/bin/vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --script /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script --no-detach --debug 1

vpnc version ERSION
ANDROID_ASSETS=/system/app
ANDROID_BOOTLOGO=1
ANDROID_DATA=/data
ANDROID_PROPERTY_WORKSPACE=10,32768
ANDROID_ROOT=/system
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
EXTERNAL_STORAGE=/sdcard
LD_LIBRARY_PATH=/system/lib
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
reason=pre-init
+ PATH=/sbin:/usr/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
+ RUNTIME_DATA=/sdcard/vpnc
+ PREVIOUS_DNS_SETTINGS= /sdcard/vpnc/previous_dns_settings
/data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script: /sdcard/vpnc/previous_dns_settings: not found
+ uname -s
+ OS=Linux
+ RESOLV_CONF_BACKUP=/sdcard/vpnc/resolv.conf-backup
+ FULL_SCRIPTNAME=/system/bin/vpnc
+ basename /system/bin/vpnc
+ SCRIPTNAME=vpnc
+ [ ! -d /sdcard/vpnc ]
+ which ip
+ grep ^/
+ IPROUTE=/system/xbin/bb/ip
+ which ifconfig
+ grep ^/
+ IFCONFIG=/system/bin/ifconfig
+ which route
+ grep ^/
+ ROUTE=/system/bin/route
+ ifconfig_syntax_ptp=pointopoint
+ route_syntax_gw=gw
+ route_syntax_del=del
+ route_syntax_netmask=netmask
+ MODIFYRESOLVCONF=modify_resolvconf_android
+ RESTORERESOLVCONF=restore_resolvconf_android
+ [ -z pre-init ]
+ do_pre_init
+ readlink /dev/net/tun
+ [ /dev/tun = misc/net/tun -a ! -e /dev/net/misc/net/tun -a -e /dev/misc/net/tun ]
+ [ ! -e /dev/net/tun ]
+ exit 0
IKE SA selected psk+xauth-3des-md5
NAT status: this end behind NAT? YES -- remote end behind NAT? no
no response from target
#

Now can anyone help?

EDIT (again): Works great on wifi, won't connect via T-Mo 3G. Are they blocking it? Blarg...
[G1 Android Development] mlevin:
Yeah, looks like I just had a bad connection. It all works now! I made a gscript out of it, too.

Not sure how to stop it nicely, so I just did a "killall vpnc" and that did it :)
[G1 Android Development] mlevin:
Is a gui definitely in the works? Because I was thinking about writing one, but I won't bother if it is already underway.
[G1 Android Development] mlevin:
Yeah, graceful would be ideal, but I just confirmed that after doing a killall I was still able to access the internet.
[G1 Android Development] mlevin:
ERSION? ;)
[G1 Android Development] N23:
I tried it now on-site and it works great, just a bunch of (error?) messages in the console appear:

...
/data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script: /sdcard/vpnc/previous_dns_settings: not found
+ echo \n
/data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script: cannot create : directory nonexistent
...
VPNC started in foreground...
vpnc[2096]: can't open pidfile /var/run/vpnc/pid for writing
vpnc[2096]: esp sendto: Message too long
vpnc[2096]: esp sendto: Message too long
...
vpnc[2096]: esp sendto: Message too long
vpnc[2096]: esp sendto: Message too long

Can't wait to get a easy to use startup und shutdown GUI :)
[G1 Android Development] Phlogiston:
Yes, definately :)

I'm having dns issues too, but I do have them on my laptop as well (normal linux machine)

As far as I found out, the problem is the dhcp client that messes up the routing table after a certain time (lease time or something).

So it helped to kill the dns client before starting the vpnc. Anyone knows what dhcp is running on android?
[G1 Android Development] Minker17:
I hate to be "That Guy" but is there a how-to for this? Or is it one of those, "if you need help, you really don't need to be trying this" sort of thing?

** Nevermind, I see you have to have Debian installed.
[G1 Android Development] Ungamedplayer:
I dont have any debian userspace installed on my system. That being the whole point of the exercise.

The how-to will become redundant soon. I have an initial connection being made from the UI now.. just cleaning things up. I'm hoping for a test release for beta users by the end of the week.
[G1 Android Development] ganny:
Looking forward to that beta release! I've been silently following this thread since you started your work, because to access WiFi at Uni I have to have VPN.
[G1 Android Development] Phlogiston:
What about a current release, or did you update the code already?

Release early, release often ;)
[G1 Android Development] smasraum:
I'm eagerly awaiting a release, any release. :D
[G1 Android Development] Minker17:
As am I! :)
[G1 Android Development] P3TR:
Any news? Would be great to see a new release
[G1 Android Development] matusz13:
Ok - I'm pretty new to the android world. Have been an actionscript developer for some time now and would have a HUGE interest in getting vpn on my phone.

My phone is pretty much right out of the box - over the past 24 hours I've been trying to get my bearings on this development world but I have to say that I feel pretty dumb.

I take it that I would need to re-image my phone to a rooted form (found jesusFreaks pages) - but didn't see any kind of walk through for it. I think thats pretty much where I'm stuck.

I wouldn't say that I require a gui, although it would be nice.

any help that can be provided would be greatly appreciated, if I can help in any way, I would love too.
[G1 Android Development] Halbamy:
modprobe

My adb shell does not know the command modprobe.

How can I fix this?

What means "A version of android with a loadable tun.ko kernel module." on the website. How can I check that?

Do I have to download tun.ko? Where can I find it?

Thanks.
[G1 Android Development] matusz13:
Ok - I've made some progress but still not 100%

After starting the go file I get the following output:

then.. a few minutes later I get the following

any ideas?
[G1 Android Development] robertpic71:
Oh yes:

not found, mean not found:

change your go script:

... /data/data/org.codeandroid.vpnc/ect/vpnc/vpnc-script ...

to:

... /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script ...

However, i've also troubles with this script (can't open). I'll try a new installation. I've also tried execute the a script from the sdcard --> no permission and chmod 777 don't help...

I'm trying a new installation.

/Robert
[G1 Android Development] matusz13:
This was actually just a typo on my part on the forum. Seems we're having the same problem. I've tried re-installing several times - no such luck.

The interesting thing being that I can actually change the directory and run the vpnc-script by itself. Go just can't seem to see it for some reason.
[G1 Android Development] robertpic71:
I've reinstalled and it works now. I've used a zip and unzip on the g1 console.

I've done a chmod 777 for the dir and chmod 777 * for all files inside /data/data/org.codeandroid.vpnc

Do have change the first line in the script?

org.codeandroid.vpnc/etc/vpnc/vpnc-script

#!/system/bin/bash --> #!/system/bin/sh

When you use windows, use notepad++ a editor that could handle linux-linefeed.

Have you seen this blog?

However my vpn works perfect for 5 minutes - and close. It seems to restart?

works 5 minutes (with oder without traffic):

lifetime status: 294 of 28800 seconds used, 0|0 of 4608000 kbytes used

lifetime status: 303 of 28800 seconds used, 0|0 of 4608000 kbytes used

got late ike paket: 84 bytes <<< got a second late ike paket?

NAT-T mode, adding non-esp marker

got r-u-there request sent ack

NAT-T mode, adding non-esp marker

NAT-T mode, adding non-esp marker

lifetime status: 312 of 28800 seconds used, 0|0 of 4608000 kbytes used

NAT-T mode, adding non-esp marker

lifetime status: 317 of 28800 seconds used, 0|0 of 4608000 kbytes used

NAT-T mode, adding non-esp marker

....

vpnc[19490]: connection terminated by dead peer detection

S7.10 send ipsec termination message

/Robert
[G1 Android Development] Halbamy:
I would like to run vpnc on a HTC Magic but the module tun.ko cannot be loaded.

Can anyone compile it for a Magic with kernel 2.6.27-00393-g6607056 or tell me how to do it?

I can compile the kernel on my pc but do not know how to compile a single module.

Thanks.
[G1 Android Development] smasraum:
It's surprising that this hasn't gotten more attention and/or results.
[G1 Android Development] matusz13:
I did get this working - as I was neglecting to change the first line in the vpnc-script.

Works great but I'm not sure how long it's actually running. I'll do some more testing with it tomorrow or later tonight, but was noticing that I seemed to lose connection after 5-10 minutes.

Not that it's terribly difficult to run as it is, but if a GUI is in the works a connection status would be a great addition.
[G1 Android Development] cyanogen:
Turn of dead peer detection and it will work 1000x better.
[G1 Android Development] robertpic71:
Yes i can confirm this. The "dead peer detection" kills the connection after 5 minutes. However, DPD (should) works fine when the dead peer detections is turned on for both sides.

I changed my script to this:

/data/data/org.codeandroid.vpnc/bin/vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --script /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script --pid-file /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-pid --no-detach --dpd-idle 0 --debug 0

/Robert

PS: Any news about the GUI?
[G1 Android Development] Der Wichtel:
I can't load tun.ko as well on my magic. Does anybody know how I can install this module?
[G1 Android Development] Halbamy:
I'm having the same problem. Modprobe is not there but insmod.

Insmod fails too but I think because the module was not compiled for my kernel which is 2.6.27-00393-g6607056 on a original Vodafone ROM with root access.

I have not gotten around to crosscompile my own module due to lack of time.

Maybe someone else wants to try it? ;-)
[G1 Android Development] Minker17:
Might be a stupid/obvoius question. But my work only uses PPTP for VPN, will this work?
[G1 Android Development] magnete:
Migrating from iPhone VPN to Android

Hello,

my company offer VPN using a mobileconfig file for iPhone, I'm trying to setup a VPN on Android and I have a few questions :

In the iPhone config I have something like this :

I don't know what to put in the Android vpn.conf under the section :

IPSec ID <group-id>

IPSec secret <group-psk>

Thanks in advance.

Regards.
[G1 Android Development] Ungamedplayer:
Thanks for the heads up for the dead peer detection, i'll put that as an option in the database in advanced.
[G1 Android Development] soloxp:
is there ever going to be a apk for this.
[G1 Android Development] Ungamedplayer:
Yes, there will sometime be an APK, If you check the SVN you will find that there is still activity.

http://code.google.com/p/get-a-robo.../trunk/packages/apps/get-a-robot-vpn-frontend

Its just not ready yet.
[G1 Android Development] Ungamedplayer:
Yes, check the front page.
[G1 Android Development] Minker17:
So this only supports IPSec, not PPTP, right?
[G1 Android Development] robertpic71:
Hi,

First, thanks for the VPNC and the GUI. I've just try to install form the market. The GUI works - but nothing happens.

The script-versions had worked for me.

1.) I've removed the old scriptversion before - is this correct? Or do the apk contains only the GUI?

2.) Is there a connect button (like the screenshots)? I see only a checkbox to activate VPN.

3.) In the local terminal (as root) is see no extra kernel-moduls.

lsmod

4.) There is not /dev/tun to see.

i see only wlan, no tun modul

Can i see any log?

My Version: JFv1.51 CRB43-EU (T-Mobile G1)

/Robert
[G1 Android Development] Ungamedplayer:
Correct, although people are already asking for this feature ( see http://code.google.com/p/get-a-robot-vpnc/issues/detail?id=6 ).. we need to get this rock solid before we continue with features though.
[G1 Android Development] Ungamedplayer:
1.) I've removed the old scriptversion before - is this correct? Or do the apk contains only the GUI?

APK contains the vpnc,vpnc script. you shouldn't need the old code anymore.

2.) Is there a connect button (like the screenshots)? I see only a checkbox to activate VPN.

Long press on the VPN name. Was thinking of just a short press to connect, not settled on it all yet.
[G1 Android Development] Minker17:
Cool, thanks for the response and keep up the good work!
[G1 Android Development] robertpic71:
Aahhh, yes thanks for the answer.

However, i get no connection and the program crashes. I never see a loaded tunnel device or and /dev/net directory.

I try to execute the setup myself (terminal)

modprobe tun

lsmod

mkdir /dev/net

ln -s /dev/tun /dev/net/tun

And start vpnc again - and it works now.

Any ideas?

/Robert (JFv1.51 CRB43-EU (T-Mobile G1))
[G1 Android Development] garok89:
works great on JF 1.51 CRB43-ADP but requires "modprob tun" before hand (force closes otherwise obviously)

only tested it over 3G as i am not at uni for another while yet

any way to make the phone modprobe tun on boot?

or possibly add it to the program (i know its still beta but just an idea)
[G1 Android Development] garok89:
sorry, that was version 0.2, no manual modprobe-ing required for 0.4

thanks guys, been waiting since i got my phone for this;)
[G1 Android Development] jrnnoruka:
how do you connect it. so i could start using it
[G1 Android Development] garok89:
after configuring the vpn, tick the enable vpn box at the top and then long press the vpn you want to connect to and hit connect
[G1 Android Development] Saiboogu:
Just installed, setup and tested in all of 5 min - much nicer than tweaking the scripts before. Very nice work man.

Having some of the DNS issues mentioned above. Haven't tested exhaustively, but here's my issue -

-Launched VPN

-Went to browser, succesfully loaded a website via the fully qualified domain (you could resolve this site from public DNS, but it would only respond to an internal IP)

-Launched "Remote" app to RDP to an internal server (not a FQD) - failed to resolve the machine name. Tried to connect via IP, worked fine.

-Disconnected VPN using the GUI, lost all network connectivity (couldn't resolve any domains, I rebooted before I thought to try an IP)

Sounds like the same issues reported once or twice above. Any suggestions for troubleshooting, log gathering, etc?

And I'll 2nd the vote for short-tap to connect, long-tap to get the menu

Even with the issues above, this is excellent work and makes my phone even more useful. Thanks.
[G1 Android Development] Ungamedplayer:
I think that this bug was solved just last week, would encourage everyone to try the newer versions as bugs have been fixed, plan to upload another version to the market sometime tonight.
[G1 Android Development] mlevin:
Just throwing in my vote for fixing the @-in-username bug. That one is killing me.

Thanks, and keep up the great work!
[G1 Android Development] NPS_CA:
Wow!

Out of the box works perfectly with the exception of VPN side DNS not being used (have to use IP addresses and not FQDN's)

Installed and setup to connect to our IPSEC VPN Cisco device. No mods needed to work on JF1.51 (ADP); connects and disconnects perfectly.

My 2 cents

- DNS; can remote side DNS work?

- Notify on connect/disconnect in notification area; seems host disconnect shows but I want a quick way to know in notify area I'm still connected

- Long press network name should be menu as shown, single press should be connect/disconnect... more intuitive.

Great going on this so far!
[G1 Android Development] garok89:
any chance of incorperating an http proxy setting so as to automatically proxy when a certain connection is made? maybe cannibalize some code from proxysetting?
[G1 Android Development] Ungamedplayer:
I'm a big fan of each tool doing their unique job. It may be possible to call the specific activity and choose a proxy on connect/disconnect, this would be better than copying and yanking code.

If you feel strongly about it, please lodge this as a feature request at the bug tracker:

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

So that others can keep track of the feature request, and that we can see the features that people most likely want. Its likely that the new features in the recent code split will render most of the code I've created useless anyway. Until the 2.0 firmware is officially released Babak and myself will continue to fix bugs and add features as our free time permits.
[G1 Android Development] Newbie16:
Hi

how do i get /system/xbin/bb/ip? can you upload your binaries please, i didn't see them in the thread?
[G1 Android Development] Alienfreak:
Thats great ;)

All our accounts at university end with @mytum and stuff...
[G1 Android Development] springah:
also RSA key support
[G1 Android Development] SpEnTBoY:
I'm able to use an RSA key fob and it works ... however I still think there is an issue with udp port encapsulation (need the option as well as ability to set port).

I really need this lol ... is it possible to just somehow specify an existing pcf file and have it read config params from there? :o
[G1 Android Development] MyTouch72:
Hello Ungamedplayer,

I've installed a new ROM, installed your VPN client and tried to use it. However i get an error in logcat that says:

are there any files or scripts that need to be cleaned up in order to fix this? or is this an issue with the tun.ko file you refer to in http://code.google.com/p/get-a-robot-vpnc/issues/detail?id=4?

Thank you!
[G1 Android Development] prscott1:
3G

Hi,

I love the vpn client! Thanks very much. You are terrific to provide this to the community.

I have a question / problem. When I connect to my cisco concentrator over 3G network, it shows connected and I get a new IP configured on tun0 - but I still can't connect using connectbot, andftp or rdp client.

When I connect to same concentrator while I am on my home wifi, I can connect using all the above with no problems.

Anyone else having trouble with 3G throughput?

TIA.
[G1 Android Development] prscott1:
I found the fix. I didn't realize you had added vpnc flags. :-)

For others having 3G problems with network translations:

add vpnc flag:

--natt-mode cisco-udp

HTH.
[G1 Android Development] vivid007:
I am having the same problem using CyanogenMod 4.2.4

When I launch the app, the SuperUser prompt displays. I allow su.

Then, the thing just spins and spins trying to configure settings.

I never see the GUI
[G1 Android Development] vivid007:
ok so apparently if it keeps spinning after you authorize su, just hit the home key and relaunch the app. it should pass su and hit the GUI.

now my problem is that our vpn is only on port 10000, which i cannot specify or it doesn't take in the IPSec gateway address...

D/process stderr( 1194): connecting to port 62465: Network is unreachable
[G1 Android Development] prscott1:
trying eclair

Deleted.

out of context.
[G1 Android Development] benschi11:
Hi, I'm really new on android, but I need vpnc.

So I tried vpn connections. Installation successfull. Also the start - ask für su permission - I gave it, but If I tried to connect to my university a loading screen appears and after a few seconds it says: "Failed to connect". (screen as attachment)

I have:

HTC Hero

MoDaCo Custom Rom 2.9

Hope you can help me!

Best regards

p.s.

sorry for my bad english
[G1 Android Development] robertpic71:
I try "unroot" vpnc (for 1.6 and higher).

I've done:

- patch the vpnc binary to use /dev/tun instead of /dev/net/tun

--> this works with root

- removed all createdir and symlinkcode /dev (this require root)

--> this works without root

However, when i execute the vpnc binary i've got the error:

making socket: permission denied

I extend my AndroidManifest.xml

with:

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.BIND_INPUT_METHOD" />

<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

The new error is:

Error to binding to source port. Try '--local-port 0'

Failed to bind to 0.0.0.0:500 Permission denied

After add --local-port 0 i got a device error and Permission denied

I didn't found any new permissions, but it works with root.

I hope this is no dead-end. Anybody has an idea?

/Robert
[G1 Android Development] mirth18:
getting to work on vogue

Thanks so much for your great work! I want to get this working on my vogue. The tun.ko supplied on the website didn't work for my hardware so I built one form the kernel which will insmod correctly.

Now I am facing the same issue as someone above, my company uses port 10000 and it seems I can't specify that.

I tried looking in the google code, but I am confused on how all the options get passed and used by vpnc from the connectionInfo object. Is there an easy way to add the port to use? Seems the values are read straight from the database. If so, i could possibly supply a patch to add this functionality to the gui, just need some more information.

Thanks for your good work.. hopefully someone can help me out.
[G1 Android Development] Phlogiston:
Can you connect from a linux machine with vpnc? If so.. how do you specify the port?
[G1 Android Development] robertpic71:
Hmm...is no option to controll the remote port. You could try some VPNC-Flags i.e.

--udp-port <0-65535>

Local UDP port number to use (0 == use random port).

This is only relevant if cisco-udp nat-traversal is used.

This is the _local_ port, the remote udp port is discovered automatically.

It is especially not the cisco-tcp port.

Default: 10000

conf-variable: Cisco UDP Encapsulation Port <0-65535>

For full help type this in a linuxinstallation:

vpnc --long-help

/Robert
[G1 Android Development] mirth18:
jumping to conclusions

I am travelling, so installed ubuntu on my computer. I used the pcf2conf to convert my works pcf file, and that configuration just works. Looking in the conf file, there is no port specified, so it looks like I was just jumping to conclusions with the port number.

Seems like tun.ko dissapears after a reboot. I am running from nand, so I am not sure how to make a file I push over with adb stay. I just now tried to mount /system rw, we'll see if it persists over a reboot.

Pushing tun.ko, here is what I see on logcat after I launch VPN Connections:

D/VPN_Connections( 469): password **********
D/VPN_Connections( 469): done interacting with vpnc
D/VPN_Connections( 469): process stderr:
D/VPN_Connections( 469):
D/VPN_Connections( 469): Attempt to read vpnc process id did not return anything
D/VPN_Connections( 469): process had died, return as failed connection

Is there anyway to get more information about what happened to vpnc? After this happens my network is all wonky, can't get to any websites.. etc. I am assuming this is because the routing table is messed up from the vpnc-script.
[G1 Android Development] mirth18:
Looks like I got the tun.ko to stay by doing this:

1. su
2. mount -o remount,rw /system
3. adb -d push tun.ko /system/lib/modules/ (in another terminal)
4. mount -o remount,ro /system
[G1 Android Development] jaroque:
Domain?

I'm using the front-end of vpnc and I don't see anywhere to put in a domain.

Is there a script that I can edit to add the --domain parameter for use with the front-end?
[G1 Android Development] jaroque:
Never mind. Was using an older version...
[G1 Android Development] mirth18:
get-a-robot-vpnc on vogue / touch

Just trying to get some help.. i am still trying to get this to work on my vogue.

I have posted the details in the vogue forum here: http://xdaforums.com/showthread.php?t=633028

Any help would be appreciated.