[lxc-users] NATed container routing

Serge Hallyn serge.hallyn at ubuntu.com
Wed Jun 25 14:51:53 UTC 2014


Quoting Raymond Jender (rayj00 at yahoo.com):
> I made a mistake in explaining my routing issue.
> I have since added another container.  Each of the two containers
> can ping each other.  Each of the containers can ping the host.
> The host can ping either container. 
> 
> 
> The containers can ping other machines on the 192.168.1.x network.
> Here's the difference: other machines on the 192.168.1.x network cannot ping either
> container. (they can ping the host)

Ah, good, that makes sense then :)

Indeed the containers are NATed behind your host's 192.168.1.x, and so
their address are simply not known to the other 192.168.1.0/24 hosts.
It's a feature of NAT.

There are a few ugly ways that I would probably work around this myself,
i.e. add per-host routes via your host's ip address on each of the other
hosts, but someone else on the list may know of an actual clean way (i.e.
running arpd on the host or settings on the AP?).

-serge


More information about the lxc-users mailing list