Problem:
I´m planning to set up several virtualized centos, rhel or ubuntu guest machines on a single centos host server (most likely using KVM). Each guest VM is running an instance of a webapp + some other services/protocols, and each guest VM needs to be reachable from outside the host, on any open port, as if each of them was a separate, DNSed box.
I´m (apparently) weak in networking tech/config, so I am simply trying to find the first edges of this problem ie. the main approaches I need to look into to get a foothold on this. Networking config "pseudocode" if you will. :)
Example:
Let´s say I own the domain foo.com.
I have a physical CentOS machine DNSed as guests.foo.com.
On this physical host machine I've got three VMs running. I want the guest VMs to be reachable as 1.guests.foo.com, 2.guests.foo.com and 3.guests.foo.com. The guest VMs run centos, rhel and ubuntu distros.
Each VM needs to respond to any (locally open) port, not just http traffic, but also ssh connections and git: protocol operations.
Where do I start, what is the most elegant approach? What, roughly, does the host and guests each, minimally, need set up for this to work well?
Note:
I´ll update the question text + comments as I learn more.