1

Topic: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

Trying to run openvpn gave me an error:

OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

The solution for me was:

mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun

source

let them build as many prisons as they want.
Even if the siege is closing in around us.
Our mind is like a wanderer, and will always be free.

2

Re: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

You can add tun to /etc/conf.d/modules with

 modules="tun" 

  and

 doas rc-update add modules default 

3

Re: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

anthk wrote:

You can add tun to /etc/conf.d/modules with

 modules="tun" 

  and

 doas rc-update add modules default 

Can you please explain the differnce between the OP and your method?
After I did what I have posted above, everything works even after rebooting. What are the benefits of adding a system service?

let them build as many prisons as they want.
Even if the siege is closing in around us.
Our mind is like a wanderer, and will always be free.

4

Re: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

The service will load modules on demand, such as tun or fuse, often needed by different software.

5

Re: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

anthk wrote:

The service will load modules on demand, such as tun or fuse, often needed by different software.

Thank you for your precious help smile .

let them build as many prisons as they want.
Even if the siege is closing in around us.
Our mind is like a wanderer, and will always be free.

6

Re: OpenVPN - ERROR: Cannot open TUN/TAP dev /dev/net/tun:

just a minor detail is that adding a line

modules="tun"

didn't work,

What worked was to uncomment the following line:

modules_2_6="tun"
let them build as many prisons as they want.
Even if the siege is closing in around us.
Our mind is like a wanderer, and will always be free.