I have created an unprivileged container with non-root user running OpenWrt in Debian Bullseye. However, PPPoE inside the container is not working. I have searched a lot of answers and came up with a pretty clumsy solution
- Change the ownership of
/dev/ppp(suppose the root user in the container is 100000):
# chown 100000:100000 /dev/ppp - Modify the container’s config file to bind mount
/dev/ppp:
lxc.mount.entry = /dev/ppp dev/ppp none bind,optional,create=file - Add
/dev/pppvialxc-device:
$ lxc-device -n container add /dev/ppp
However, every time the system boots, the ownership of /dev/ppp will return to root and I have to change it every time. There are some answers recommend using cgroup, but Debian suggests using cgroup2 and I tried to add
lxc.cgroup2.devices.allow = c 108:0 rwm
to the config file, it does not work. Is there a solution that can work between reboots?