Openvpn problem (FIXED)

Started by wizard3001, September 04, 2013, 03:39:25 PM

Previous topic - Next topic

wizard3001

Did somebody tried to install and successfully run OpenVPN?
I get this error :
  Wed Sep  4 11:08:34 2013 us=813827 Note: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Wed Sep  4 11:08:34 2013 us=814121 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Sep  4 11:08:34 2013 us=814319 /sbin/ifconfig  10.1X.X.XXX pointopoint 10.1X.X.XXX mtu 1500
SIOCSIFADDR: No such device
: ERROR while getting interface flags: No such device
SIOCSIFDSTADDR: No such device
: ERROR while getting interface flags: No such device
SIOCSIFMTU: No such device
Wed Sep  4 11:08:34 2013 us=964866 Linux ifconfig failed: external program exited with error status: 1
Wed Sep  4 11:08:34 2013 us=965213 Exiting

I've googled and tried so many things now.
Thanks for your help.

rzr

it looks TUN/TAP is not built in kernel check in config file

wizard3001

In the new versions of the Debian images everything is ok .

olibit

Unfortunately, in the latestest offical microsd card image available for download on the olimex website for the A10 OLinuXino Lime, there is still no tun device support activated in the kernel.

Could you please update the A10 OLinuXino Lime kernel / image, too?

laskov

Try as root
modprobe tun
before starting openvpn. Tun can be compiled as a kernel module.

olibit

#5
I've already tried that and searched the module path /lib/modules for a tun module without success

Image is a linked in the wiki https://www.olimex.com/wiki/A10-OLinuXino-LIME
https://drive.google.com/file/d/0B-bAEPML8fwlZWMtZHZCNVNoYTQ/edit?usp=sharing
"A10 OLinuXino LIME Debian 4GB SD-card image release-2"
olimex@a10Lime:~$ cat /proc/sys/kernel/version
#4 PREEMPT Sat Dec 14 15:12:10 EET 2013
olimex@a10Lime:~$ cat /proc/sys/kernel/osrelease
3.4.67+
olimex@a10Lime:~$ sudo modprobe tun
FATAL: Module tun not found.
olimex@a10Lime:~$ sudo insmod tun
Error: could not load module tun: No such file or directory
olimex@a10Lime:~$ find /lib/modules/ | grep -i tun
/lib/modules/3.4.67+/kernel/drivers/media/common/tuners
/lib/modules/3.4.67+/kernel/drivers/media/common/tuners/xc4000.ko
/lib/modules/3.4.67+/kernel/drivers/media/common/tuners/mt2063.ko
/lib/modules/3.4.67+/kernel/drivers/media/common/tuners/tea5761.ko
olimex@a10Lime:~$ sudo lsmod
Module                  Size  Used by
cpufreq_stats           2769  0
sunxi_cedar_mod         9928  0
gpio_sunxi              8381  0
8192cu                454593  0
ump                    50853  0
sw_ahci_platform        3715  0

olimex@a10Lime:~$ sudo ls -l /dev/net
total 0
crw-rw-rwT 1 root root 10, 200 Jan  1  2010 tun
olimex@a10Lime:~$ sudo cat /dev/net/tun
cat: /dev/net/tun: No such device


if tun support was present in the kernel, there should be a different error message "File descriptor in bad state" instead of "No such device"


LubOlimex

Hey olibit,

In the official images we enable only the modules that are widely used. The thing is that a lot of users were not happy when we enabled more kernel modules since that left less user space and consumed more resources. 

As far as I see your question was answered couple of times above but to make it clear: to be able to use "tun" you need to recompile the kernel with the related kernel module turned on. Please use the build instructions as a reference: http://olimex.wordpress.com/2013/12/13/building-debian-linux-image-for-a10-olinuxino-lime-with-kernel-3-4-67/ especially the part where the kernel options are configured with the command make:

# make ARCH=arm menuconfig

If a lot of people show interest in tun we might enable it in the default images in future.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

tolosband

PLEASE PLEASE openvpn kernel required! too much time to cross compile from scratch!

Quote from: LubOlimex on April 14, 2014, 09:14:59 AM
Hey olibit,

In the official images we enable only the modules that are widely used. The thing is that a lot of users were not happy when we enabled more kernel modules since that left less user space and consumed more resources. 

As far as I see your question was answered couple of times above but to make it clear: to be able to use "tun" you need to recompile the kernel with the related kernel module turned on. Please use the build instructions as a reference: http://olimex.wordpress.com/2013/12/13/building-debian-linux-image-for-a10-olinuxino-lime-with-kernel-3-4-67/ especially the part where the kernel options are configured with the command make:

# make ARCH=arm menuconfig

If a lot of people show interest in tun we might enable it in the default images in future.

Best regards,
Lub/OLIMEX

tolosband

For me it's fixed ONLY now ->> i'll attach image and modules if someone needs it.
In my image works tun/tap and also IPTABLES.

SITE ADMINISTRATORS please put it in your downloads since I have limited space left in my
google drive account... and will remove it in future

https://drive.google.com/drive/folders/0B-oMwmmIY-XHM3FrVl81cWN3aEU?usp=sharing

INSTRUCTIONS:
mount sd card partition 1 and unzip uImage inside
mount sd card partition 2 and rm-rf /lib/firmware and /lib/modules/*
untar lib.tgz in the / dir

JohnS

Perhaps more useful longer term would be the steps you took (and others could follow) to create it.

Otherwise at some point it's just one more outdated unpatched image.

The steps will take a lot less space, too!

John

tolosband

Quote from: JohnS on December 22, 2016, 07:03:25 PM
Perhaps more useful longer term would be the steps you took (and others could follow) to create it.

Otherwise at some point it's just one more outdated unpatched image.

The steps will take a lot less space, too!

John

the steps are in this thread... boring thing...
I personally used an old Ubuntu trusty install

http://olimex.wordpress.com/2013/12/13/building-debian-linux-image-for-a10-olinuxino-lime-with-kernel-3-4-67/

JohnS

Oh.  You seemed to be saying you'd done something new.

John

tolosband

Quote from: JohnS on December 22, 2016, 08:28:49 PM
Oh.  You seemed to be saying you'd done something new.


John


You're right but.. never needed to learn cross compile in a VM with a raspberry.. I wanted to point out that.

JohnS

You did it on RPi?

(I use a multi-cpu PC, no need for a VM either.)

John

tolosband

Quote from: JohnS on December 22, 2016, 10:22:06 PM
You did it on RPi?

(I use a multi-cpu PC, no need for a VM either.)

John
;D naaa ok, ok.. sorry my english: wanted to say that raspian kernel is more complete! I understand that olinuxino wants to be a lightweight distro... but would be great to have at least 2 kernel sauces : one "standard" and one "more complete" to be used in an headless enviroment without graphical frontend (ie networking) dont you think?