0

lsmod -> tun 16587 0 - Live 0xbf0e1000

Openvpn error: Cannot open TUN/TAP dev /dev/net/tun no such file or directory

I tried creating a dummy directory but the error changes to Cannot open TUN/TAP dev /dev/net/tun: Is a directory.

edit: System: ARM Linux 3.10.0

enter image description here

0

/dev/net/tun is character device not file nor directory. Check it with ls command:

ls -lad /dev/net/tun

It shall look like (notice first c):

crw-rw-rw- 1 root root 10, 200 Feb 10 21:38 /dev/net/tun

To fix unload tun module:

rmmod tun

remove /dev/net/tun directory if it exist (directory is marked with d instead of c):

rmdir /dev/net/tun

Reload tun module:

modprobe tun

It shall create character device /dev/net/tun.

  • I unloaded tun and deleted the /dev/net/tun directory that I created. modprobe tun doesn't work and outputs 'module tun.ko not found'. Instead I loaded the module using insmod. The character device is NOT being created – Luke Feb 18 at 17:29
  • @Luke what kind of system is that? (please add the info in your question, not in comments) – mosvy Feb 18 at 17:36
  • Check system logs (for example dmesg | tail) immediately after loading tun module. Probably it will show some error. – John Doe Feb 18 at 17:38
  • dmesg does not show an error – Luke Feb 18 at 17:58
  • try to create tun device manually mknod -m 0666 /dev/net/tun c 10 200 – John Doe Feb 18 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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