one public IP – many sub-/domains – many local servers [duplicate]

I have one static public IP where 20+ domains/subdomains (A-records) pointing on it. On the LAN-side I have 10+ servers (boxes) running alot of services each (http, smtp, imap, ssh, ftp, rdp, etc.). This servers should be accessable with all services/ports from the WAN with the correct sub-/domain pointing to it.

Which soft-/hardware solution is needed to forward the domains to the correct server?

After two days researching, I lost track for this project.
Is a reverse proxy, HAProxy, load balancer, biNAT or a special DNS the correct solution.

UPDATE: isn’t it possible to handle every port/service over a proxy-server which checks the given domain e.g. “abc.example.com” and port e.g. “22” and the proxy knows which local server is meant and builds a connection to the local server?

Answer

You will either need to obtain additional IP addresses or else PAT traffic to those internal hosts using non-standard ports on the WAN.

Of the protocols you mentioned, only HTTP has a concept of a “domain”, via the HTTP host header. The rest of the protocols merely use the domain name to resolve an IP address.

Attribution
Source : Link , Question Author : Mike , Answer Author : EEAA

Leave a Comment