proxmox:vpn:allow_openvpn_to_create_a_tun_device
This is an old revision of the document!
Proxmox - VPN - Allow OpenVPN to create a tun device
Due to built-in security of LXC, trying to setup a tunnel interface inside a container is blocked by default.
ERROR: Cannot open TUN/TAP dev /dev/net/tun
Allow this for a specific container
Add these lines to /etc/pve/lxc/<container-id>.conf:
- /etc/pve/lxc/<container-id
.conf> 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"
proxmox/vpn/allow_openvpn_to_create_a_tun_device.1623710632.txt.gz · Last modified: 2021/06/14 22:43 by peter