Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, 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 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 (,

share|improve this question
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 '11 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 it would return an IP and port so that the user wouldn't need to ever know the port? – Tylor Feb 3 '11 at 19:53
re: ports - See Christopher's point about SRV records. – Zoredache Feb 4 '11 at 3:21
up vote 1 down vote accepted

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
  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 ).
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.