OpenVPN with Root - Updated 8/19

vossco32

Member
Aug 7, 2006
17
0
0
I'm also having issues getting OpenVPN to work on the official release ROM.

Getting FATAL: Cannot allocate TUN/TAP dev dynamically on the final 2.2 release.
This is the same error I am getting. If you check the logs it is not loading the tun module because it thinks it is for a different kernel. It is actually the same kernel just with a difference version string. Old kernel string 2.6.32.15-g5e1ad8b new kernel string 2.6.32.15-gb7b01d1.
 

PokerMunkee

Senior Member
Jun 18, 2010
55
1
0
I installed Kings kernel that has tun.ko compiled in. I can now connect but back to where I can't ping anything, unless I do a "ifconfig tap0.....". Damn, why is this hard to get working lol
 

geekamole

New member
Sep 3, 2010
1
0
0
This is the same error I am getting. If you check the logs it is not loading the tun module because it thinks it is for a different kernel. It is actually the same kernel just with a difference version string. Old kernel string 2.6.32.15-g5e1ad8b new kernel string 2.6.32.15-gb7b01d1.
I used a hexeditor to change the first (and only, I think) instance of "2.6.32.15-g5e1ad8b" in tun.ko to "2.6.32.15-gb7b01d1" and it loaded fine, connects fine, everything AOK. No recompile needed. I don't know if that would have worked had the strings been different lengths.
 

cosar

New member
Feb 21, 2010
3
0
0
Hi! I am new to opnvpn on mobile. I have HTC Desire with LeeDroid 2.2f ROM and I'm rooted. I managed to use and open openvpn installer. It seems working from logcat. Also, I am using openvpn client on Windows with a user account. The problem is that from where can I get the .cert .ovpn etc. files. Or how can I create them manually? Any help appreciated.
 

Stockmoose16

Senior Member
Jul 19, 2010
289
3
0
"Make sure you copy your config file and any relevant keys to a folder"

I'm a noob and trying to install OpenVPN on my Inc. I am using HMA Pro on my W7 computer, but where do I find the Config files and relevant keys that you mention in the quote above? I have no clue.

Would appreciate some direction on this!
 

Stockmoose16

Senior Member
Jul 19, 2010
289
3
0
Easy way - OpenVPN on rooted/S_OFF Incredible with BusyBox installed:

This is by far the easiest way to set up OpenVPN. Make sure you copy your config file and any relevant keys to a folder on your sdcard. First, you need to know where BusyBox is installed, and if you already have the tun.ko module. For BusyBox, for most Roms based off the 2.2 8/1 leak, the location is /system/xbin. An easy way to check on your phone:

adb shell
find / -iname "iptunnel"

The path containing the file is where BusyBox is installed. If you don't have it installed, you can follow the instructions at the bottom of this post to install it.

The tun.ko module depends on your kernel. With the hydra 2.2 kernels, the location is /system/lib/modules/tun.ko . Easy way to check:

adb shell
find / -iname "tun.ko"

If you do not have tun.ko on your system, then you can download it for 2.2 (tun.zip) or 2.1 (inside openvpn.zip) attached to this post.

Next, download the following two apps from the Android Market:


OpenVPN Installer
OpenVPN Settings


Next, run OpenVPN installer, click install, give it an install path (I prefer /system/xbin), and give it the path to BusyBox.

Finally, run OpenVPN Settings. Go to Menu -> Advanced, make sure "Load tun kernel module" is checked.

Click on "TUN module settings"
Change "Load module using" to insmod
Change "Path to tun module" to... the path to your tun.ko file. Click back.
Update "Path to configurations" and "Path to openvpn binary".

That should be it!

--

I followed all these instructions, and openVPN has a checkmark next to it, but when I click on any of the servers it just says "superuser privileges has been granted," but won't actually check the server. So nothing happens. I'm using Virtuous 2.2. I used the Tun.ko file attached to this post.

What am I doing wrong and how can I fix it?
 
  • Like
Reactions: randrew2

camro

Senior Member
Apr 20, 2007
1,827
33
0
well, i played also with openvpn ...
but now on my new device galaxy 9000, the problems are ongoing ...

Mon Feb 7 22:33:03 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:4: route (2.1.1)
Mon Feb 7 22:33:03 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:9: ifconfig (2.1.1)
Mon Feb 7 22:33:03 2011 OPTIONS IMPORT: timers and/or timeouts modified
Mon Feb 7 22:33:03 2011 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Feb 7 22:33:03 2011 ROUTE default_gateway=46.124.52.1
Mon Feb 7 22:33:04 2011 TUN/TAP device tap0 opened
Mon Feb 7 22:33:04 2011 TUN/TAP TX queue length set to 100
Mon Feb 7 22:33:04 2011 NOTE: unable to redirect default gateway -- VPN gateway parameter (--route-gateway or --ifconfig) is missing
Mon Feb 7 22:33:04 2011 Initialization Sequence Completed

this would mean, that the busybox doesn'T support the ifconfig/route commands...

any idea ?
info:
device: galaxy i9000
kernel: 2.6.32.9 (speedmod with tun configured in kernel)
firmware 2.2.1 (build darky's rom 9.2)
busybox: BusyBox v1.17.3 (2010-10-18 13:41:40 BST) multi-call binary.
(all links for ifconfig + route made to the busybox in /system/bin + /system/xbin/ +system/xbin/bb

any idea ?
Code:
ifconfig -a
gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-1E-00-0C-3D-00-00-00-00-00-00-00-00
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:61198 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61198 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2759928 (2.6 MiB)  TX bytes:2759928 (2.6 MiB)

pdp0      Link encap:Point-to-Point Protocol
          inet addr:46.124.52.104  P-t-P:46.124.52.104  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:27198 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30335 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14562322 (13.8 MiB)  TX bytes:3137307 (2.9 MiB)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

svnet0    Link encap:UNSPEC  HWaddr A0-00-80-00-00-00-10-00-00-00-00-00-00-00-00-00
          UP POINTOPOINT RUNNING NOARP  MTU:65541  Metric:1
          RX packets:10237 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1439 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:169752 (165.7 KiB)  TX bytes:25686 (25.0 KiB)

tap0      Link encap:Ethernet  HWaddr CE:7D:39:37:CC:A1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:66 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:21333 (20.8 KiB)  TX bytes:0 (0.0 B)

tunl0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-10-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 0A:98:50:55:4E:34
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# route -en
route -en
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
46.124.52.0     0.0.0.0         255.255.255.0   U         0 0          0 pdp0
0.0.0.0         46.124.52.1     0.0.0.0         UG        0 0          0 pdp0
 
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