Editor

Well-Known Member
Apr 26, 2017
108
1
58
Turkey
Hello,

I installed openVPN on the CentOS 7 in LXC but I can't start this service.

I getting this error:

Error:
process started and then immediately exited: ['Sat Mar 3 12:52:57 2018 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)']
service failed to start or returned error status
process started and then immediately exited: ['Sat Mar 3 12:52:58 2018 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)']
service failed to start or returned error status

What can I do for it?
 
I was getting
ERROR: Cannot open TUN/TAP dev /dev/net/tun
Until I added these lines to /etc/pve/lxc/<container-id>.conf

Code:
lxc.cgroup.devices.allow = c 10:200 rwm
lxc.hook.autodev = sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"
 
  • Like
Reactions: davide_xeons

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!