Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I apologise in advance if the question doesn't make sense, please let me know.

I've got a small LAN (~10 Virtual Servers) using Win Server 2008 as a DNS server. This is behind a smoothwall express 3.0 firewall with ports forwarded for specific services. I have a domain (123-reg) with the NS's that of afraid.org (DynamicDNS) and subdomains pointed to my (Dynamic) IP address e.g.

subdomain1.example.com -> 123.456.789.101.

I think that adequately explains my set up.

My question is, am I able to have subdomains e.g. subdomain1.example.com only point to a specific local host? Like so:

subdomain1.example.com:80 -> firewall(external facing) -> server1.example.com:80
subdomain2.example.com:80 -> firewall(external facing) -> server2.example.com:80

I don't actually necessarily want to use port 80, otherwise I would just use VirtualHosts on apache, it is just an example port.

Currently I can use either subdomain1.example.com OR subdomain2.example.com and they will both point to server1.example.com:80

I do not have to stay using Win Server 2008 for DNS, I am more than happy to move over to BIND if needs be, it was just easier to use Win Server 2008's DNS.

I do not know if this is even possible, I have a feeling it isn't as I've only got one external IP address but any information is useful!

share|improve this question

1 Answer 1

In the general case, it's not possible, but you could use a reverse proxy for the specific case of HTTP traffic

The reason is that there is generally no information in an IP packet that would identify the subdomain your tried to access, so the router wouldn't know to which machine he should forward your packet.

For HTTP (v1.1) this works because it contains the requested domain name in it's request.

share|improve this answer

Your Answer

 
discard

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.