0

More explanation needed.

I have a Windows Server 2008 R2 server that controls the DNS for my domain name. I have a network setup with one external IP and a few servers behind a router.

What I want to do is have it so that if I do to www.mydomain.com, the DNS server will realize that I have chosen to go to the subdomain WWW for which the httpd is hosted on UbuntuBox1. I then go to secret.mydomain.com and the DNS server notices that I want to go to the httpd on UbuntuBox2. Using straight DNS it would make it so that if I route these subdomains to the internal IPs, external clients will just get a dns query telling them to go to their own local network (considering that is the nature of dns). What I want is for it to realize which server I want to go to based on the dns query, and then route the traffic internally in my network (like a really smart router possibly).

Is this possible, and if so, how do I go about doing it?

PS Please don't just say to use web related trick, I need an all purposes/all port kind of solution that if I were to host two minecraft servers (just an example) on the same IP then I would be able to have them on the default port and redirect only using subdomains (mc1.mydomain.com, mc2.mydomain.com).

3
  • You can't run two services on the same IP+port, period. The only way it is possible for HTTP, is because HTTP includes the functionality in the HTTP protocol. Even with HTTP, only a single process can be listening on a single IP+port, that process then reads into the HTTP packets and select the site based on that.
    – Zoredache
    Feb 3, 2011 at 19:33
  • Well something like IIS has "bindings" which allow it to look at the name provided to it, I assume then that that is built into the HTTP protocol? If so, can I then make the DNS return a port as well? for example, if someone tries to hit mc2.mydomain.com it would return an IP and port so that the user wouldn't need to ever know the port?
    – Tylor
    Feb 3, 2011 at 19:53
  • re: ports - See Christopher's point about SRV records.
    – Zoredache
    Feb 4, 2011 at 3:21

1 Answer 1

1

There are only 4 options I can think of.

  1. Use a reverse web proxy, but won't support your minecraft example I think.
  2. Use protocols that support DNS SRV records http://en.wikipedia.org/wiki/SRV_record
  3. Get more public IP addresses.
  4. Map different ports for the one external you have to different systems on the inside. ( You'd need to do this to get SRV system working ).

You must log in to answer this question.

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