[lxc-users] tun device in unprivileged Debian Stretch lxc Container

Mike Wright nobody at nospam.hostisimo.com
Wed Sep 28 14:11:00 UTC 2016


On 09/22/2016 05:14 PM, Paul Dino Jones wrote:
> Hi all,
>
> I could have sworn in the past I was able to make an unprivileged
> container use openvpn, but yesterday, i started an unprivileged
> container and was not able to use openvpn because I did not have a
> /dev/net/tun. I was able to get it started in a normal privileged
> container after performing a mknod. Which makes sense because an
> unprivileged user isn't going to be able to create that tun device.
>
> I'm just wondering if there is something I'm missing since I think it
> used to work.

If it does not exist create /dev/net/tun

   mknod /dev/net/tun c 10 200

In lxc parlance you would add a line like this to your config file

lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=file



More information about the lxc-users mailing list