Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I cannot manage to load the tun module in my archlinux box. I'm trying to connect with openvpn, but the log says

nm-openvpn[6662]: Note: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)

lsmod | grep tun

returns nothing.

If I run

sudo modprobe tun

it returns failure, but no error message, and lsmod still has no tun. The module seems to exist, as there is a tun.ko.gz in /lib/modules/.......

I really dont know what else to try.

Thanks in advance

share|improve this question

2 Answers 2

up vote 7 down vote accepted

This answer is probably a bit late, but I ran into the problem, exactly as described, myself.

Running openvpn would produce:

Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

, and running tunctl would produce:

Failed to open '/dev/net/tun' : No such file or directory

, and

lsmod | grep tun

had no output. When attempting to add the tun module via

modprobe tun

modprobe would exit with a failure error code (1), and nothing changed.

I found an alternate way of activating the tun module via insmod. First locate the module with this command:

find /lib/modules/ -iname 'tun.ko.gz'

then use insmod with the returned path (I only got one match), for example:

insmod /lib/modules/3.6.9-1-ARCH/kernel/drivers/net/tun.ko.gz

For me, running that command worked, and tunctl and openvpn worked ok afterwards.

share|improve this answer
    
Had this too on my raspberry pi, insmod solved it (after a reboot I can modprobe as usual) –  unhammer Jul 5 '13 at 8:05
    
Thamks! the insmod command works! Had this for an openconnect issue: Failed to open tun device: No such device –  Antonio Saco May 9 at 20:05

I ran into a similar problem when trying to run openvpn on OVH Cloud VPS, openvpn complains that cannot find TUN interface.

modprobe will always return module not found :

$ sudo modprobe tun
FATAL: Module tun not found.

Finally, I found that tun is not a module but built in kernel, so what I do to solve was created the missing dir and nod:

$ sudo mkdir /dev/net
$ sudo mknod /dev/net/tun c 10 200

And then openvpn can find and use the tun device.

To be noted that afterward, modprobe will still return an error, because tun is not a module.

$ sudo modprobe tun
FATAL: Module tun not found.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.