2

I'm preparing to configure a remote server, located in some data center.
This server will have single public IP assigned.
This server will have a hypervisor of some kind (KVM or Xen) installed.
Hypervisor will host multiple virtual appliances (web server, private cloud, project management, etc).
Most of those appliances have web interface of some kind.

I would like those web interfaces to be accessible from internet, thru different host names, like this:
SomeApliance.MyDomain.com
OtherApliance.MyDomain.com

How to accomplish that with single public IP assigned to the host machine?

Should I use proxy of some kind? if yes, should this proxy have its own vm or be a part of host? Maybe there is something like standalone mod_rewrite that does that? Or maybe I should use IP tables to do that?

I'm not looking for precise answer. Just point me in the right direction. Even google search phrase will do.
It seems to me, that this should be a common problem, yet I can't find any thing.

1

1 Answer 1

0
  1. Yes, for this use case a proxy is required (otherwise you'll have to publish the web services using nonstandard ports)

  2. You can install the proxy (for example Apache with mod_proxy) on the host or in a separate VM.

If you choose to install the proxy on the host:

  • install the required packages (for example apache and mod_proxy)
  • add to the host one or more bridges to which you'll connect your VMs
  • give to the bridge an IP address so that the physical host can communicate with the VMs

If you choose to install the proxy in a VM:

  • create a bridge to which you'll connect the external side of the proxy, give it a (private) ip (let's call it br0)
  • give the VM an interface connected to the br0, with an IP address on the same network of br0
  • use br0's IP address as default gateway for the proxy VM
  • enable nat (SNAT) on the host's public interface so that trafic from the proxy can exit with the (only) public IP
  • forward (DNAT) the needed ports (80, 443?) from the host public ip to the proxy "external" ip

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .