[lxc-users] Need help with static IP address -- Simplest use case.

Mark Constable markc at renta.net
Sat Jun 10 01:51:39 UTC 2017


On 10/06/17 11:40, Michael Johnson wrote:
> I'm able to configure a bridge on the host, and the host uses the
> bridge just fine. How do I get the container to use the bridge? The
> container seems to ignore all interfaces not created by 'lxc network
> create'. I'm guessing because iptables gets populated by that
> command.

Once you have started a container then simply...

lxc exec CONTAINER_NAME bash

and bring up the eth0 interface however your OS normally does that job.

An example for debian/ubuntu is to edit /etc/network/interfaces and
add normal static IP vales that you would use for any host then restart
the systemd networking system.

> Possibly the iptables instance in the container needs some entries
> as well but hoping someone can confirm or deny that.
Best to disable any firewall rules until you get the basics working.


More information about the lxc-users mailing list