Fix for the following OpenVPN error
Error
ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
This was the fix I used that worked for me.
- Create a bash script and save it somewhere:
#!/bin/bash
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun
/etc/init.d/openvpn restart
- Save it with 755 permissions
- Add it to the root crontab via the
crontab -e
command and add the following to the bottom
@reboot /path/to/the/bash/script
- Reboot the machine and pray :-)
Source:
https://serverfault.com/questions/1003011/openvpn-error-cannot-open-tun-tap-dev-dev-net-tun-no-such-file-or-directory