This guide quickly describes how to connect a Linux container as VPN client with OpenVPN.
There are some settings on the host's side required, because OpenVPN requires a specific tun
interface.
nano /etc/pve/lxc/<container-id>.conf
lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net dev/net none bind,create=dir
chown 100000:100000 /dev/net/tun
ls -l /dev/net/tun
It should print:
crw-rw-rw- 1 100000 100000 10, 200 Dec 22 13:26 /dev/net/tun
openvpn --config <config-file>.ovpn
Sourced from pve.proxmox.com - OpenVPN in LXC