[lxc-users] Networking LXD containers

Fajar A. Nugraha list at fajar.net
Fri Mar 11 08:40:51 UTC 2016


On Fri, Mar 11, 2016 at 3:12 PM, Kean Sum Ooi <keansum at gmail.com> wrote:
> Hi Steve,
>
> Do you mean LXC containers? On Ubuntu?

@Kean: I think he means lxd, not lxc

@Steve: I assume you use ubuntu host?

Some info in https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-network
still apply. In particular, iptables forwarding is the easiest way to
allow access to a port in your container.

However if you use nested containers, and want outside hosts to reach
all the nested containers, you'd probably need bridge:
https://github.com/lxc/lxd/blob/master/specs/configuration.md#type-nic

The outside container bridges host's eth0 (e.g.
https://help.ubuntu.com/lts/serverguide/network-configuration.html#bridging),
and then on that container you create a bridge which the inside
container uses. Should work.

-- 
Fajar


More information about the lxc-users mailing list