0

The setup I'm trying to create:

  • a single physical dedicated server with a single public IP
  • a number of hosted virtual machines (DomUs, with XEN) running Virtualmin (LAMP + other services), basically like a LAN with NAT
  • HAProxy running on the physical server: it routes incoming connections to them on the right port, using hostnames

This works flawlessy with Apache on each VPS, but it doesn't seem to work with FTP/SSH/DNS: they don't use hostnames to discern which VPS has to be called.

Is there a way to accomplish this?

PS: I know I could run, for example, a single nameserver on the physical machine to serve DNS for all the domains hosted on the virtual machines, but my goal is to have these VPS autonomous, to be able to move them in the future without remembering which services are shared/bound with the hosting physical server.

flip79
  • 143
  • 8
  • Relatively easy to do if you use FTPS rather than FTP and do SNI routing using haproxy. For DNS, you can do forwarding using dnsmasq but you'd need to know each zone on what VM it is. For SSH it is much more tricky. – Florin Asăvoaie Aug 07 '17 at 00:31
  • You can use different ports for competing services on each VM. That way you port forward the specific port to the necessary VM. – Appleoddity Aug 07 '17 at 00:36

0 Answers0