[Lxc-users] Seeking advice on appropriate network layout for my LXC setup
James Gallagher
james at jamesgallagher.ie
Fri Jan 4 19:52:18 UTC 2013
Hi,
I'm starting to use LXC with a view to service segregation and have come up against a wall in terms of my lack of networking knowledge - I'm now second-guessing myself on everything. So I'd appreciate some suggestions from yourselves.
I've previously used VirtualBox for a LAMP & RoR environment for self-hosting. I'm now running a fresh Ubuntu 12.10 VM with LXC installed. So far, this VM has a single interface (eth0) using VirtualBox's Bridged Networking and configured with a public IP. This all works fine and I tested connecting to a container running a web server from an external connection.
My intention is to have a container running nginx as a reverse proxy and containers running the various combinations of Apache, PHP, RoR, MySQL, etc software for the web apps I want. After experimenting (mixed success) with combinations of the Ubuntu default lxcbr0 (nginx container attached) and macvlan (the other containers + additional interface in the nginx container) I've come back around to looking at simply attaching all containers to lxcbr0. I don't think anything I want to run would have an issue with NAT. I would then port forward connections to the public IP for web onto the nginx container and so on for other services. The nginx container would proxy to the various apache container instances - as they're all connected to lxcbr0 i'm assuming from what I've read that's as straightforward as a regular LAN.
As I say, after a few days of experimenting, I'm second guessing myself on everything so would appreciate someone sanity checking my plan. I'm completely open to alternatives if there's a better way of doing this.
Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130104/2402a5d7/attachment.html>
More information about the lxc-users
mailing list