Question regarding tun module

Hi, I am trying to install OpenVPN on ubuntu 18.04 bionic but having problem regarding TUN module.

This is the error I am getting:

Sun Feb 24 19:40:29 2019 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)

I read that it has to do with the kernel.


Either the kernel module is missing (rebuild kernel with CONFIG_TUN flag) or the device is not created (use mknod):

1 Like

I think we have already enabled CONFIG_TUN as m. See

Which kernel version are you running? What uname -r shows?

1 Like

Thanks @Loic, @hipboi, working now after following the below steps.
my board kernel:
# uname -r

mkdir /dev/net 
mknod /dev/net/tun c 10 200
chmod 0666 /dev/net/tun
modprobe tun

I just need to check later if it still loads after reboot.

Those steps will not load after reboot. If you want it to happen automatically, you’ll need to add it to an init script.

1 Like