[Lxc-users] multiple containers network config

Arun M arunmahadevaiyer at gmail.com
Tue Apr 3 14:29:32 UTC 2012


Hello,

I am looking for a standard network config that can be used for running
multiple containers in the same physical host. There could be 100s of
containers running in a single host.

What I am not clear is, what IP and ethernet address should I use while
invoking the container.

Should I just create a bridge device with a local IP (say 192.168.254.1)
and add this as the default gateway for all the containers.

For access to external network, would a single NAT rule like this suffice?

iptables -t nat  -A POSTROUTING -s 192.168.254.0/24 -o eth0 -j MASQUERADE

Also the containers should have limited network access. They should be able
to
 1. connect to a limited set of outside hosts in the intranet
 2. connect only to a few well known ports (say 80/443) in the internet.

Thanks,
Arun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120403/7e70e623/attachment.html>


More information about the lxc-users mailing list