Linux – Cannot open TUN/TAP dev /dev/net/tun: No such device

linuxopenvpnvpn

Previously I've already been able to connect to my server with openVPN. Now I've set up a new one with the same configuration, if I remember correctly, and on a client when trying to connect I get this:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Exiting due to fatal error

I run it as "sudo openvpn client.ovpn".

Best Answer

Enable TUN/TAP device driver support in kernel.

  1. Open kernel menuconfig.
  2. Enable Device Drivers -> Network device support -> Universal TUN/TAP device driver support
  3. Compile and load the kernel again.

It will work!