How to fix Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)?

Daniel Urstöger
02-11-2011 10:56

I only saw this error in Xen instances running openvpn but there it happens all the time after a reboot, seems udev is cleaning up afterward itself quite nicely ;)

Anyhow, quick and easy fix:
 

aptitude install udev
mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 0700 /dev/net/tun
modprobe tun
/etc/init.d/openvpn restart

Average rating: 3 (2 Votes)

You cannot comment on this entry