From my understanding on container technology (like lxc or docker), when you create a container it by default uses a "private network" like 10.0.1.x.

I do not understand why you would not want it on the same NAT as your host OS. Why would you not want your container to be bridge on your primary network interface by default?

Is it for security reasons? And is there a faster command to bridge the container interface or do I really have to apt-get install bridge-utils and configure everything for lxc?

Please help me understand.


Setting up a bridge is extra work. Someone has to do this work. Since some containers should be bridged and others shouldn't be bridged, container utilities don't systematically set up a bridge.

It's very common for a container not to be bridged. The point of a container is to isolate the container from the rest of the world. This often means that the container should not have unconstrained network access. If the host does the firewalling, then the container must not be bridged.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.