Hi everyone,
I tried to gather some information to install OpenVPN on the Galaxy Tab 10.1, but could not complete the install.
I already installed successfully OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules).
I ran those commands (first had read only errors but eventually succeeded with adb console) :
insmod /modules/tun.ko
ln -s /system/bin/busybox/system/xbins/bb/ route
ln -s /system/bin/busybox/system/xbins/bb/ ifconfig
Then, when i launch OpenVPN Settings, it starts connecting but finally says "FATAL: Linux ifconfig failed, could not start external program".
Anybody could tell me how to do it properly? Is it even possible on the Galaxy Tab 10.1?
Many thanks!!!
I'm about to try it right now, I have ovpn running on my galaxy s, just going to create certificates for my tablet, and copy the config across and see if it works.
I believe the default kernel includes tun support.. or so I have been told.. will find out I guess.
Thanks! Keep me updated please.
Anyone able to make progress on getting openvpn working?
Hi. I just wanted to add that if anyone have any more info on openvpn and tun.ko for the gt-7100 that i too would be greatful.
Vissie
I have openvpn working. I installed busybox installer, openvpn and openvpn settings from the market place.
I Used root explorer and made the directory /system/xbin/bb. I also used root explorer to make this directory read/write. Then I used a terminal app to do
Su
ln -s /system/xbin/route /system/xbin/bb/route
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
after this make the directory read only. In openvpn settings point tun.ko path to
/data/media/openvpn/openvpn/tun.ko
add your config and that should do it
i still can't connect
Well when i comment
iproute /data/local/bin/iproute-wrapper.sh
Click to expand...
Click to collapse
openvpn connects but i cant browse my local lan
when i uncomment this line nothing happens when i try to connect
what did i missed?
one more question - im using ccd folders with different push commands on my vpn server - this doesnt seem to work aswell.
Anyone could post stepby step iproute configuration for our devices?
thanks
Wojtek
I've been trying again and again.
I always get "FATAL: Linux ifconfig failed, could not start external program".
Anyone could post a complete tutorial ?
Thanks.
I did it!!!
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Which kernel are you using -- stock or ??
I'm running the stock kernel.
can you please tell me......
armavista said:
I installed OpenVPN Installer, BusyBox Installer, OpenVPN Settings, copied tun.ko to modules folder (/system/lib/modules), then copied the configuration files of my VPN (ca.crt and client.ovpn) to /sdcard/openvpn.
I ran those commands with adb tools :
mount -o remount,rw /system
insmod /modules/tun.ko
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
In the advanced settings of OpenVPN Settings, the path to tun module is "/system/lib/modules/tu", the path to configurations is "/sdcard/openvpn" and the path to openvpn binary is "/system/xbin/openvpn".
Then i launched OpenVPN Settings, entered the username and password and it connected.
I hope it can help...
Click to expand...
Click to collapse
You said you run stock kernel, but what rom are you on: kmb, kme?
Also, can you please point me to the tun.ko file or a pointer of where I can get it.(the one that you have working)
Much thanks.
The version of my kernel is [email protected] #1.
ROM : HMJ37.UEKF3 P7510UEKF3
I attached the tun.ko file i used for you.
Keep me updated...
I managed to make openvpn work.
I am using openvpn setting software.
For galaxy tab 10.1, the openvpn binary and the associated lib liblzo.so is missing, so you just need to copy those two files from , say cm7 sources.
Simply download the attachment and extract it, there are two files:
openvpn : copy it to /system/xbin/openvpn ( don't forget chmod 755 to it )
liblzo.so: copy it to /system/lib/liblzo.so ( don't forget chmod 644 to it )
I have tested it on my galaxy tab 10.1 P7510, works great.
Hoping this would help.
Sorry to mention, i am using starburst kernel which already have tun support in the kernel.
For stock kernel, maybe you need to have matched tun.ko copied from elsewhere.
I get this message
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko
I pushed tun.ko to /system/lib/modules via adb , though I cant see it with root explorer
If it's there tou should be able to see it with root explorer
I run GT-P7500, Kernel 2.6.36.3, [email protected] #1, buildnr HMJ37 P7500XXWKG9, baseband XXKG7, ).
I have seen statements that there is no tun.ko in the kernel and the available versions of tun.ko do not work with the 3.1 Honeycomb kernel, I have.
I do not have a folder called modules under /system/lib, shall I create one.
The directory modules I have is /lib/modules/...
insmode did not work.
I run openvpn from the shell and it stops after establishing the TCP connection, this is just before establishing the tun...clearly I am still missing the tun.
Does anyone else experienced same problem or have a solution?
Hi I'm having a nightmare trying to get openvpn installed.
When I do the insmod /modules/tun.ko i get
the following
[email protected]:/ # insmod /modules/tun.ko
insmod: can't open '/modules/tun.ko'
255|[email protected]:/ #
any idea what I'm doing wrong
Hey everybody.
I also have some problem with openvpn connection.
At first i turn on openvpn the start the configuration (at the same time i started a ping on my server: ping 300.300.300.300 -t)
After that my ping works for 12 - 14 times. After the 12 + 14 times then it shows "out of time" error message.
What have i done wrong? (Every 5 seconds at the bottom of my tab it shows "myvpn.openvpn: Connected"
Preferences:
Samsung Galaxy Tab 10.1 Rooted
Android 3.1
Newest Busybox
Done everything from the tutorial of this topic
Update: When i turn the tun module on then the ping only works for about 9 times.
After about 20 failed pings, the pink works again for the amount i wrote.
Related
Hi,
I was wondering if OpenVPN is supported out of the box and if not, is there a possibility to make it work?
Searched the forum but couldn't find any specific info..
thanks in advance!
EDIT:
I created an update.zip which is posted in this thread
Not supported out of the box... it's baked into CM7 but obviously that's a custom rom! There's OpenVPN apps on the market but they require a rooted device. The one I've found to work the best was OpenVPN Settings (not the SGS2) but it requires the openvpn binary to be installed somehow first...
I'm using OpenVPN Settings on a CM based rom now (HTC Hero) From what I remember it needs tun.ko support in the kernel
Don't know if the default kernel has this..
Sent from my HTC Hero using Tapatalk
I had rooted my gs2 and installed openvpn binary, openvpn settings works.
but always see "FATAL: Linux ifconfig failed: could not execute external program".
Who can tell me why?
I remember I had the same issue a long time back before I was using CM based roms
Can't remember what but will try to look it up this weekend as I'm curious about the result
really need OpenVPN wheb I get my SGSII
Sent from my HTC Hero using Tapatalk
tux
Sent from my Nexus One
diesiren said:
ifconfig failed: could not execute external program
Click to expand...
Click to collapse
this seems to mean that OpenVPN is looking for ifconfig in the wrong place
you should connect your phone through usb and start adb shell
then type (change openvpn.conf to the conf file you are using)
Code:
openvpn --config /sdcard/openvpn/openvpn.conf
if you launch the command above there will some messages in the shell window
you should look for ifconfig
/system/xbin/bb/ifconfig tap0 192.168.1.40 netmask 255.255.255.0 mtu 1500 broadcast 192.168.1.255
Click to expand...
Click to collapse
now you know the path where OpenVPN is looking for ifconfig and where it can't find it (/system/xbin/bb/ifconfig)
now type the command below to locate where ifconfig is on your rom
Code:
which ifconfig
this could be for example
/system/xbin/ifconfig
Click to expand...
Click to collapse
now type the commands below in adb shell (ln -s <correct path> <incorrect path>)
Code:
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
this will create a correct link for ifconfig and route commands
I have not tested it myself as I flashed a CM rom shortly after
but if you replace the values with your values it should work fine and not do any harm
if you get it to work could you please let me know?
thanks!
S2 is not in my hand right now. I'll try it tomorrow and thank you very much.
Sent from my Nexus One
OpenVPN works fine now and thx Gawis!!
This is my steps
1. Flashing Firmware with Odin (guide)
2. Root My S2, and busybox installed with SuperOneClick (guide)
3. Download OpenVPN File download and extract
4. Use adb tools
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
5. Download and install OpenVPN Settings From Android Market
6. Upload My config files to USBstorage.The path is /sdcard/openvpn/
7. Flashing StockKernel with Odin (guide)
over~
Sorry for my poor English~
Hi diesiren,
thanks for confirming and putting up the guide!
I'm really glad it works, hope to have my phone nex week or the week after and will try this one myself then!
diesiren said:
Code:
adb remount
adb push openvpn-static-2.1.1 /system/xbin/openvpn
adb shell
# chmod 775 /system/xbin/openvpn
# mkdir /system/xbin/bb
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
Click to expand...
Click to collapse
I just got my OpenVPN working on my SGSII!
I just rooted it with CF-Root 3.7 and then pushed the openvpn binary and executed the commands you posted
thanks for the guide!
I'm having problems getting openVPN to work.
I have adb pushed openvpn-static-2.1.1 to system/xbin already.
But when i adb shell, the result is "sh:applet not found"
I am 100% I am rooted. I am running root explorer, titanium backup, have busybox installed, and superuser.
Any advice would be extremely helpful.
Thanks!
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
I just uploaded the update.zip in this thread
Gawis said:
Hmmm, haven't experienced any issues like that with adb yet so can't comment on that...
I created an update.zip for the whole thing a few days ago...
Are you running a custom rom? If so which one?
Am planning to post the update.zip here later...
I tested it with Cognition and CM7...
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
I'm on Exynos v3.6 ROM.
I saw your thread. Thanks for the zip, bro. Very much appreciated.
Thanks for the help! I found that I had to first remount in read/write mode the /system directory as mine was read-only.
Ran the code below to do this:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Hey...
I have a similar issue. My SGS2 already is connected to the openVPN but i can't connect to an other client at the vpn. So no Ping, no tracerroute or (most important) telnet connection. I think it might be something about the routing but I don't find a hint on any forum.
Hi...
How one can obtain tun.ko to be able to use openvpn on my flyer 3g?
2.6.35.10-ge9e45cc kernel....
enjoy.....
Has the Stock ROM VPN ability? I am tryin it with your File, bot it doesn't work...
Whould you write a short guide, please?
I got this message:
"FATAL:Cannot allocate TUN/TAP dev dynamically"
Load module with insmod...
Make sure that you have /system/xbin/bb folder with ifconfig and route links to binaries in /system/xbin/busybox (ifconfig) and /system/xbin/busybox (route)
# ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
# ln -s /system/xbin/busybox /system/xbin/bb/route
Would it be possible to get one of these tun.ko files for FlyHoney 0.2 ? Loving HC on my flyer, but I'm really missing the ability to use anyconnect.
Noob question
Will the same files work on HC?
EDIT:
Just tried and get this error - so i guess not
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
Can anyone post one for kernel version 2.6.35.10-gfc8464e?
TIA
For HC kernel 2.6.35.10-g6ea054a
I whould like to use the tun.ko for 2.6.35.10 gfc8464e too.
Is there somebody who has it already? Or is willing to compile it?
Hi guys,
Here is a tutorial to get OpenVPN working on a p500 with mik's 6.5.7 (latest stable release). This works.
how to get OpenVPN configured, running, and connected:
required: config files from your openvpn server (eg.. ca.crt, ca.key, etc) located in /sdcard/openvpn
Create symlinks to ifconfig and route
open SSHdroid (or adb, terminal emulator, etc.)
type this:
su (press enter adn this will prompt for root access just grant)
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
chmod 700 /system/xbin/openvpn
mkdir /system/xbin/bb
busybox ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
busybox ln -s /system/xbin/busybox /system/xbin/bb/route
reboot
Download OpenVPN Installer from the Market
when installing choose:
/system/xbin
and then
/system/xbin/bb
Copy your client config files from your VPN server to:
/sdcard/openvpn
then
cd /sdcard/openvpn
chmod 755 *
Download and install OpenVPN Settings from the Market
press Menu button
>Advanced
>TUN module settings
Set "Load module using" to insmod.
Set "Path to tun module" to /system/lib/modules/tun.ko
Reboot your phone and open OpenVPN Settings.
checkbox the 1st option to turn on OpenVPN
checkbox the second option to connect
Bump
Any help? I am so close!
[SOLVED]
Turns out that I had to add this rule in iptables on my server. Although openvpn was working from my pc (on limited ports) it would not work at all with my phone. The fix was:
iptables -t nat -A POSTROUTING -j SNAT --to-source [ip of server]
sed -i 's/eth0/venet0/g' /etc/sysconfig/iptables
/etc/init.d/iptables save
Background: On a rooted device, I installed busybox via the BusyBox Pro app, with the "symlinks" option checked. Afterwards, wifi stopped working, root stopped working, adb stopped working, and a lot of tasks started failing with "sh: applet not found".
The problem: BusyBox Pro 8.0 replaces /system/bin/ash with a symlink to busybox. This was problematic on my device, where /system/bin/sh was a symlink to ash, so now 'sh' is actually calling busybox, and this particular compilation of busybox didn't have 'sh' support compiled in, hence the "sh: applet not found" error everytime anything tried to call sh, which as it happens, is a lot! The bug was fixed quickly with a 8.1 release, but due to suspected caching policies on the Google Store, a lot of people still got the old release even after this was fixed!
Here's how I fixed this:
Prerequisite: You'll need a replacement sh binary. On another device, which was also an ARM device, sh was symlinked to 'mksh', and I just took this. You might want to verify that the binary works on your broken device before completing the final steps below.
Initial Wifi
It's only DHCP that is failing (on the "Obtaining IP address..." step), so go into your Wifi Settings, forget the network, add it again, and change DHCP to "static", manually fill in the appropriate IP info for your network, and you'll be good to go (encrypted network is fine).
Getting a Root terminal
Download KBOX from http://kevinboone.net/kbox.html
In KBox, menu -> more -> preferences, change shell -> "command line" to "/system/bin/ash"
su -s /system/bin/ash
Remounting /system as RW
In theory, all you should need to do is: busybox mount -o remount,rw /system
This didn't work for me, and I got a "permission denied (are you root)" error, I guess because the system was no longer booting properly. I had to redo some of the steps involved in rooting my device, in my case:
On phone:
mkdir /data/local/lib
echo ro.kernel.qemu=1 > /data/local.prop
reboot
(wait for reboot, and get into a root terminal again as per the above)
On PC (from previous files used for rooting my device):
adb push lsm_disabler.ko /data/local/lib/
Oh phone:
insmod /data/local/lib/lsm_disabler.ko
rm /data/local/lib/lsm_disabler.ko
cat > /data/local.prop
From this point, I was able to remount successfully:
mount -o remount,rw /system
Fixing sh
Now on your PC, push the replacement binary to /system/bin, in my case:
adb push mksh /system/bin
On phone:
cd /system/bin
busybox ln -sf sh mksh
Verify now that "./sh" gives you a working terminal.
If all is good:
mount -o remount,ro /system
reboot
All done! Wow, this saved me sending my device back to Japan, since it's still using the stock bootloader and there are now available update.zip's out there. Good luck everyone, feel free to ask questions :>
P.S. I'm going to contact BusyBox Pro's author now with some suggestions to prevent these kind of problems happening in the future.
Deleted.
Deleted.
I rant into the same problem on my Galaxy Tab. Thanks for this, it saved my day!
A little correction to this little thing:
Kinslayer81 said:
On phone:
cd /system/bin
busybox ln -sf sh mksh
Click to expand...
Click to collapse
This worked for me:
cd /system/bin
ln -sf mksh sh
chmod 755 sh
Thank you
Just want to say thanks.
Your Posting helped me out with the Problems on my htc flyer.
I installed BusyBox Pro by Stephen (Stericson) to fix a missing symlinks problem that I had after installing JRummy's Busy Box. I then encountered the applet not found problem and then just reinstalled JRummy's version and it fixed it without having to do anything else.
Kinslayer81 said:
Background: On a rooted device, I installed busybox via the BusyBox Pro app, with the "symlinks" option checked. Afterwards, wifi stopped working, root stopped working, adb stopped working, and a lot of tasks started failing with "sh: applet not found".
The problem: BusyBox Pro 8.0 replaces /system/bin/ash with a symlink to busybox. This was problematic on my device, where /system/bin/sh was a symlink to ash, so now 'sh' is actually calling busybox, and this particular compilation of busybox didn't have 'sh' support compiled in, hence the "sh: applet not found" error everytime anything tried to call sh, which as it happens, is a lot! The bug was fixed quickly with a 8.1 release, but due to suspected caching policies on the Google Store, a lot of people still got the old release even after this was fixed!
Here's how I fixed this:
Prerequisite: You'll need a replacement sh binary. On another device, which was also an ARM device, sh was symlinked to 'mksh', and I just took this. You might want to verify that the binary works on your broken device before completing the final steps below.
Initial Wifi
It's only DHCP that is failing (on the "Obtaining IP address..." step), so go into your Wifi Settings, forget the network, add it again, and change DHCP to "static", manually fill in the appropriate IP info for your network, and you'll be good to go (encrypted network is fine).
Getting a Root terminal
Download KBOX from http://kevinboone.net/kbox.html
In KBox, menu -> more -> preferences, change shell -> "command line" to "/system/bin/ash"
su -s /system/bin/ash
Remounting /system as RW
In theory, all you should need to do is: busybox mount -o remount,rw /system
This didn't work for me, and I got a "permission denied (are you root)" error, I guess because the system was no longer booting properly. I had to redo some of the steps involved in rooting my device, in my case:
On phone:
mkdir /data/local/lib
echo ro.kernel.qemu=1 > /data/local.prop
reboot
(wait for reboot, and get into a root terminal again as per the above)
On PC (from previous files used for rooting my device):
adb push lsm_disabler.ko /data/local/lib/
Oh phone:
insmod /data/local/lib/lsm_disabler.ko
rm /data/local/lib/lsm_disabler.ko
cat > /data/local.prop
From this point, I was able to remount successfully:
mount -o remount,rw /system
Fixing sh
Now on your PC, push the replacement binary to /system/bin, in my case:
adb push mksh /system/bin
On phone:
cd /system/bin
busybox ln -sf sh mksh
Verify now that "./sh" gives you a working terminal.
If all is good:
mount -o remount,ro /system
reboot
All done! Wow, this saved me sending my device back to Japan, since it's still using the stock bootloader and there are now available update.zip's out there. Good luck everyone, feel free to ask questions :>
P.S. I'm going to contact BusyBox Pro's author now with some suggestions to prevent these kind of problems happening in the future.
Click to expand...
Click to collapse
This helped get my wifi back after flashing a kernel.
Hey there,
I've got the same problem.
After reinstalling the ROM everything works fine,
but when I try to install busybox, I get the same failure everytimes.
How can I prevent it?
Do I have to follow the steps above?
And where do I get the sh binary from?
Sorry guys, I'm a little confused and hope you may help me..
Thanks!!
Kbox not open in my ics when I open it its automatically closed
And i want to ask the script su -s /system/bin/ash where i put this script
I have an Xperia J, stock rom, 4.1.2 latest FW. It's rooted and I have busybox installed in /system/xbin
I'm trying to install openvpn, but I'm having trouble connecting to my server.
For now, after some search, I need help symlinking two applets: ifconfig and route. They both are symlinked to toolbox. I need then to be linked to ifconfig and route that are in xbin (I believe this is what has do be done... I've tried this in terminal, but gives me a "file already exists" error.
ln -s /system/bin/ifconfig /system/xbin/ifconfig
Can you tell me what I have to do in order to when openvpn calls ifconfig, it goes to the busybox ifconfig?
Thanks