On Wed, Oct 28, 2015 at 12:00 AM, Itamar Gal <[email protected]> wrote:
> I have two LXC containers: lxc-proxy and lxc-app. I want to put lxc-proxy > on br0 with a (static) public IP address and on lxcbr0 (with a private IP), > and I want to put lxc-server on lxcbr0. Then I want to run Apache on > lxc-proxy as a proxy server to relay requests to a web application on > lxc-app. > > If you need a private network with static IP assigned, create your own bridge. Don't use lxcbr0. Using lxcbr0 might work, but that's not what it's intended for, and may lead to some unexpected problems. For example, one of your "normal" containers can get a DHCP IP which you also use statically in your "server", leading to IP conflict. > iface eth0 inet static > gateway 1.2.3.1 > > iface eth1 inet static > gateway 10.0.3.1 > This isn't lxc issue. You should spend some time learning networking basics. On most normal configurations, no matter which OS you use, there can only be one active gateway. Unless you REALLY know what you're dong, remove the gateway line from your private network interface. > lxc.network.ipv4=1.2.3.4/27 1.2.3.31 > <http://lxc.network.name> > For clarity and simplicity, use only ONE of lxc-configuration (the "config" file), or container-OS-side configuration (e.g /etc/network/interfaces) to specify IP address. Don't use both. In your case you'd probably better of with the container-OS-side. -- Fajar
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
