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:

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!