[lxc-users] can't have internet in lxc container

Fajar A. Nugraha list at fajar.net
Wed Dec 14 09:59:52 UTC 2016

On Wed, Dec 14, 2016 at 3:57 PM, mierdatutis mi <mmm286 at gmail.com> wrote:

> I have a host ubuntu with dhcp and I would like to have a ubuntu guest
> container with ip fixed. I'm trying to set up the /etc/network/interface
> with these conf:

Also, I've modified the config file of the ubuntu lxc:
> lxc.network.link = lxcbr0

> lxc.network.ipv4 =
> lxc.network.ipv4.gateway =
First thing first: you shoud either configure IP address in your container
(e.g. /etc/network/interfaces), or in lxc config file. Not both.

Another thing, is the network of your lxc bridge (lxcbr0),
or your LAN?

IIRC lxcbr0 defaults to (at least in did the past). If you want to
put the containers in the same network as your host, macvlan would be the
easiest choice. But it comes with a catch: you container will not be able
to communicate with your host by default, unless your host also use macvlan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161214/65d8e320/attachment.html>

More information about the lxc-users mailing list