Openvpn working! (ROOTED only)

Search This thread

Salpula

Senior Member
Sep 9, 2010
95
7
Is there a way to get openVPN or any other type of VPN to connect automatically when I connect to a specific network?

Sent from my Xoom using XDA Premium App
 

Adam B.

Senior Member
Jul 13, 2007
78
26
Indianapolis
Also this doesn't seem to work with VPNConnections, the program for IPSEC VPNs. Shame, I was really excited for it too.

I've fixed vpnconnections to work with the XOOM. I build busybox into the app, and updated the vpn script accordingly.

You'll need a kernel with tun working.
 

Attachments

  • VPNC.apk
    972.6 KB · Views: 421

kris7778

Member
Mar 11, 2009
15
1
I'm able to get tun.ko to load successfully with insmod. (verified in dmesg)

I get permanently hung with "trying to connect" in "vpn connections". Where can I see the output of what it is calling at the commandline?

I'm using know good settings from vpnc on linux.

thanks,
Kris
 

trackerk

Member
Dec 6, 2010
42
12
Oklahoma City
geekwarrior.net
I'm able to get tun.ko to load successfully with insmod. (verified in dmesg)

I get permanently hung with "trying to connect" in "vpn connections". Where can I see the output of what it is calling at the commandline?

I'm using know good settings from vpnc on linux

run openvpn from a terminal window:

Code:
su
cd /path/to/conf/files
openvpn your.conf

That should give you the info you need.
 

Holsum

Senior Member
Jun 1, 2010
124
13
i used the VPNC that adam posted in this thread but i am still running into an issue. i have a pin+token that i use to login to our cisco IPSEC vpn but i cant get it to work.

I fill in the following fields

connection name: (filled in)
IPSec gateway: (our server)
IPSec ID: (group name)
IPSec Secret: (group password)

here is where i get confused

Username: (my username to login)
password: (do i put my pin here)
Password + token digits (checked)

**should i be putting my pin in the password or leaving it blank and then when i try and connect just use my pin+token?

is this necessary

timeout (do i fill this)

Any help with this would REALLY be appreciated, thanks!

holsum
 

Holsum

Senior Member
Jun 1, 2010
124
13
nvm i got it working perfectly. i redid everything and installed thed newest busybox from the market. then all i did was uninstall and reinstall the vpnc in this thread and my vpn is up and working perfectly.


thanks!


there is one problem, when i disconnect the vpn it just says disconnecting forever. i have to actually force stop the application. anyone have any suggestions?
 
Last edited:

Holsum

Senior Member
Jun 1, 2010
124
13
anyone having and issue when they disconnect their vpn of it hanging with the updated vpnc?
 

bigworm50

Senior Member
Mar 31, 2011
242
46
I get the same error, I just rooted using the one click posted here at xda.

My dmesg details are

Code:
<3>[ 1004.762765] tun: version magic '2.6.36.3-g53275e0 SMP preempt mod_unload ARMv7 ' should be '2.6.36.3Tiamat_Xoom-v1.1.6_BRDizzle--gdbf3921 SMP preempt mod_unload ARMv7 '

I'm unable to insmod the overclocked tun.ko on the overclocked kernel.

I get the following error:
 

bigworm50

Senior Member
Mar 31, 2011
242
46
Ok, so I suspect I need a tun.ko compiled for the tiamat OC kernel. I am capable enough to do that myself with a little direction if no one else needs it too.

Thanks!
 

hatxtrick

Member
Dec 8, 2010
40
7
DFW
To OP and others that have gotten this to work:

I've run into a wall with this, and could use help/advice.
1. Do you having to use both OpenVPN & VPNC Along with the obvious installs and additions of busybox & the TUN.ko file?

This may be a stupid question, but with my DX I'm able to just use VPNC, the TUN.ko file & busybox to access my company's Cisco SSL vpn.
I've run through the same process with the Xoom -yes I used files that were crafted for the Xoom (tun file and vpnc client from here & a busybox installer from a different forum-) and its a no go every time.
I had some luck early on and could get it to connect and pull and IP from the host network, however I could not get to anything inside or outside the tunnel. (seemed like no dns on either side) plus once i disconnected I had to toggle between 3G and wifi for 3 to 4 minutes to be able to get back to the net.

I'm currently running the non-oc kernel but have tried with both.

Any help would be greatly approached.


Cheers,
Hattrick
 

Holsum

Senior Member
Jun 1, 2010
124
13
To OP and others that have gotten this to work:

I've run into a wall with this, and could use help/advice.
1. Do you having to use both OpenVPN & VPNC Along with the obvious installs and additions of busybox & the TUN.ko file?

This may be a stupid question, but with my DX I'm able to just use VPNC, the TUN.ko file & busybox to access my company's Cisco SSL vpn.
I've run through the same process with the Xoom -yes I used files that were crafted for the Xoom (tun file and vpnc client from here & a busybox installer from a different forum-) and its a no go every time.
I had some luck early on and could get it to connect and pull and IP from the host network, however I could not get to anything inside or outside the tunnel. (seemed like no dns on either side) plus once i disconnected I had to toggle between 3G and wifi for 3 to 4 minutes to be able to get back to the net.

I'm currently running the non-oc kernel but have tried with both.

Any help would be greatly approached.


Cheers,
Hattrick

No, you do not need openvpn to get this to work. i would uninstall everything and start over.

my suggestion is to reflash with the tiam 1.1.6 kernal and that tun.ko file. Then just download busybox from the market and install the vpnc from this thread (which is exactly what i did) and everything works perfect.

~Holsum
 
Last edited:

xoppaw

Senior Member
Apr 4, 2008
65
0
I had to follow the instructions there, and my OpenVPN is working. The odd thing is that i still get the constant disconnect/reconnect even though i can pass traffic. is that just a bug in the OpenVPN Settings app, or is something still jacked up on my system. I can supply some logs if you let me know what your looking for. I'm on a wifi xoom running Tiamats kernel with tun.ko in my /system/lib/modules.

thanks,
-xoppaw
I'll try http://code.google.com/p/android-openvpn-settings/issues/detail?id=26 when I get out of work. Weird thing is though it works on my phone no problem.

edit// that seems to have done it. I'm now connected and can pass traffic. Now I just need to figure out why "connected" keeps popping up in my notifications.

Anyone coming across this, that is having a similair issue. Here is the part of the log that pointed trackerk to the push issue (just in case I remove the log from my dropbox)

Code:
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:4: dhcp-pre-release (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:5: dhcp-renew (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:6: dhcp-release (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:13: route (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:14: route (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:15: route (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:18: register-dns (2.1.1)
Tue Mar  8 15:36:18 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:20: ifconfig (2.1.1)
 

mikejs78

Member
Aug 25, 2010
24
0
Actually the tun.ko file seems to be loaded, but every time I try to connect to vpn using VPNC I get a "Failed to Connect". Works fine on my Droid X.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Also this doesn't seem to work with VPNConnections, the program for IPSEC VPNs. Shame, I was really excited for it too.

    I've fixed vpnconnections to work with the XOOM. I build busybox into the app, and updated the vpn script accordingly.

    You'll need a kernel with tun working.
    2
    It isn't easy, but if you have rooted your Xoom then you can get Openvpn running. If you are not familiar or comfortable working in the guts, then don't do this.

    > You must have ROOTed your Xoom.

    Follow these not so easy steps:

    1) From the market, install the Busybox installer.
    2) Run the Busybox installer and select /system/xbin for the install location.

    3) Install Openvpn Installer
    4) Run the installer, specify /system/xbin for the location
    5) The installer will say it failed, and it surely has, no worries though, because it left the bit we need on the sdcard
    6) From a terminal shell:
    Code:
         su
         mount -w -o remount /system
         mkdir /system/xbin/bb
         ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
         ln -s /system/xbin/busybox /system/xbin/bb/route
         cp /mnt/sdcard/openvpn /system/xbin/
         chmod 555 /system/xbin/openvpn
         mount -r -o remount /system
    5) Open the attached tun.zip file and copy the tun.ko file to your /mnt/sdcard/openvpn directory along with all your other configuration files.
    6) From a terminal shell:
    Code:
        su
        insmod /mnt/sdcard/openvpn/tun.ko
    That is a pain to do every time and I never had any luck getting modules to load automatically. So you can use the Openvpn settings program from the Market which is what I do.

    7) Install Openvpn Settings from market
    8) Run Openvpn Settings
    9) Press menu button and select "Advanced"
    10) Select "Load tun kernel module"
    11) Select "TUN Module Settings"
    Load module using = insmod
    Path to tun module = /mnt/sdcard/openvpn/tun.ko

    I think that should get you going, but it has been a long day and I may have missed something. There surely must be an easier way to get openvpn installed. But this is what worked for me. If you've done this before then the important bit is the Xoom tun.ko file.

    UPDATE: My tun.ko doesn't work with coolbho3000's overclocked kernel. I think it is a difference in the kernel versions koush and he used. Still trying to learn how git works so I can get the exact version of the source coolbho used. I will post another tun.ko when I get it working.

    UPDATE 2: Thanks to instructions from coolbho3000 I have recompiled tun.ko with the right version number for his overclocked kernel. The tun.ko for the overclocked kernel is in the file tun-overclock.zip. So use tun.zip if you are running koush's kernel and tun-overclock.zip if you are running coolbho3000's overclocked kernel.

    UPDATE 3: Updated this post to reflect that a new busybox installer was released to the market that fixes it's install.
    1
    Thanks for this post! Quick question though - where do I find the openvpn installer?
    1
    From the command line run:

    insmod /path/to/tun.ko

    (with whatever path you saved tun.ko to)

    to make sure it is being loaded. It probably is since you see it in netcfg. But that is the most common reason for openvpn not working.

    If that works, then look to see if openvpn is finding the ifconfig and route commands. The only way I could get it to work with the Openvpn Settings program was to put them in /system/xbin/bb.