0

and thanks for your input.

What I want to do: I want to host some applications Web and email, for example, for myself and two clients on one static IP Address, primarily to learn, and possibly to consider some limited hosting for a couple of long-term clients with small numbers of users.

What I have I am up and running on XenServer Xeon with 32GB Ram, on a 100MB Connection but on a single Static IP.

What I'm trying to figure out I want to experiment with setting up a few virtual machines on the xenserver, running IBM Lotus Domino (This uses several ports) 80, 25, 1352 for example. So I need to figure out how to forward traffic to the appropriate server based on domain name. So for example

Single External WAN IP -> domain1.com:80 -> VM1:80 Single External WAN IP -> domain1.com:1352 -> VM1:1352

Single External WAN IP -> domain2.com:80 -> VM2:80 Single External WAN IP -> domain2.com:1352 -> VM2:1352

Single External WAN IP -> domain3.com:80 -> VM3:80 (Running Cpanel for web hosting)

I understand that a reverse proxy may be the way. NGINX or POUND, but it seems that is only for web applications, not for other applications. I also stumbled around Citrix Netscaler, and just became thoroughly confused. I also kind of saw using DD-WRT's iptables or something. There just must be a way to do this. I would appreciate any input anyone has. Surely somebody is doing this somewhere.

I'm open to routers, custom or otherwise, or appliances virtual or otherwise, but I would love something software based like a virtual appliance or something. Any ideas?

Thanks

Shane

1

2 Answers 2

1

So I need to figure out how to forward traffic to the appropriate server based on domain name

This is not possible unless there is an application layer specification (eg, HTTP's Host header). Without that IP knows nothing of DNS so you can't forward basted on it.

See this substantially similar question from the other day: can I use DNS with private NAT addresses?

1

First of all, recommend setting up IPv6 and route a /60 to each VM. That way users who has IPv6 won't experience any of the problems related to proxying going on, because their traffic will be routed directly to the desired host.

Additionally having IPv6 on the VMs give you an address to proxy the traffic to, which in some settings will be easier, because the proxy can rely on DNS to find the backend.

A reverse proxy is the way to go for HTTP traffic. A reverse proxy can also handle HTTPS traffic as long as both the client and the proxy support SNI. This will work even if the webserver does not support SNI. This does not have to be limited to port 80 and 443. The proxy could be configured to receive traffic on arbitrary ports.

SMTP can be handled by installing a mail relay on the IPv4 address. Care must be taken to ensure it will not be abused to relay spam. I recommend setting up a firewall rule such that the relay cannot connect to external SMTP servers. The firewall can allow SMTP connections from outside to the relay, from the relay over IPv6 to the VMs, and from the VMs to the outside world as either IPv6 or as IPv4 which obviously has to go through a NAT.

DNS can be supported in principle, but I don't know if anybody has implemented support for it yet.

If you have other specific protocols in mind, I'd be happy to come with suggestions as to how they could be supported. I don't know of any other protocols, which send the domain name early enough for such a frontend to dispatch based on domain name, but I'd like to learn about others.

I have implemented one such frontend myself, but only HTTP and HTTPS for now, which are by far the easiest protocols to support.

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