[lxc-users] Adding /dev/ppp to container under lxd

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jan 29 18:12:27 UTC 2016


Quoting Matt Willsher (matt at monki.org.uk):
> Hi,
> 
> I'm trying to add /dev/ppp to a container so I can initiate a PPPoE connection from inside the container.
> 
> lxd is 0.27
> 
> I have the following configuration on the container, derived from https://github.com/lxc/lxd/blob/master/specs/configuration.md#type-unix-char
> 
> config:
>   linux.kernel_modules: pppoe
>   ppp:
>     major: "108"
>     minor: "0"
>     mode: "0600"
>     path: /dev/ppp
>     type: unix-char
> 
> The device appears in the container:
> 
> crw------- 1 root root 108, 0 Jan 28 10:06 /dev/ppp
> 
> Access to /dev/ppp gets denied:

Yeah, that is coming from linux/drivers/net/ppp/ppp_generic.c which
has a check at ppp_open() for !capable(CAP_NET_ADMIN).  That requires
the capability against the initial user_ns, meaning you will only
be allowed to do this in a privileged container (security.privileged: true).

> # cat /dev/ppp 
> cat: /dev/ppp: Operation not permitted
> 
> # ifup pppoe0
> Plugin rp-pppoe.so loaded.
> Couldn't open the /dev/ppp device: Operation not permitted
> modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.0-25-generic/modules.dep.bin'
> Linux kernel does not support PPPoE -- are you running 2.4.x?
> Failed to bring up pppoe0.
> 
> Is there some other configuration that needs to be set on the container at allow access to /dev/ppp? 
> 
> Thanks,
> Matt
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list