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

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

You cannot comment on this entry