Allow OpenVPN / Wireguard connection to an lxc

lifeboy

Renowned Member
To allow a tunnel to be established into a container, this post describes a method to do so.

The essence of it is this:

Add to the container config these lines
Code:
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir

Then change the /dev/net/tun device's ownership:
Code:
chown 100000:100000 /dev/net/tun

This works. The container now has a /dev/net/tun with owner root in it.

However, this changes the ownership of the proxmox node's /dev/net/tun. This could break things on the node or not?

What is the correct way to do this please?
 
Last edited: