LXC on Proxmox

2016-07-24

During the migration I've hit a minor problem that the LXC containter by default isn't allowed to access the TUN device. To solve this I had to add this line to the LXC config in /etc/pve/lxc/[ID].conf

lxc.cgroup.devices.allow = c 10:200 rwm

Make sure that you restart the container after you've added this line. Inside the container I had to add this code to the file /etc/rc.local

if ! [ -d /dev/net ];then
mkdir /dev/net
fi
if ! [ -c /dev/net/tun ]; then
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun
fi

After this configuration the openvpn server worked without a problem.

2016-07-19

I'm going to deploy OpenVPN with Ansible. Maybe I'm going to generate the certificats again from scratch. Or I'm copying I'm not sure yet

Resources


Revision #1
Created Thu, Feb 7, 2019 6:50 AM by Andreas Zweili
Updated Tue, Feb 12, 2019 10:32 AM by Andreas Zweili