TUN/TAP on LXC Container

NelaxIT

New Member
Apr 3, 2020
1
0
1
24
Hi,
i'm Nicolò from Nelax.it. We are using proxmox and we have some problems during openvpn installation. It says TUN is not available. We serched on the web and we founded this solution:
edit the container file in cd /etc/pve/lxc/containerid.conf
add the following lines:
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"

everytime that we reinstall the vps the last 2 lines are going to overwritten.
Is there a solution to enable the TUN permanently?
Thank You
Bye
 
hi,

another solution is to convert a CT with the already changed config into a template (right click and convert to template). afterwards you can clone the template to create a new CT with these settings
 

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!