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.

TIA

Either the kernel module is missing (rebuild kernel with CONFIG_TUN flag) or the device is not created (use mknod):
https://www.kernel.org/doc/Documentation/networking/tuntap.txt

1 Like

I think we have already enabled CONFIG_TUN as m. See

https://github.com/96rocks/kernel/blob/release-4.4-rock960/arch/arm64/configs/rockchip_linux_defconfig#L468

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
4.4.154-59-rockchip-g5e70f14

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