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 have two servers on my network both are running Windows server 2008 r2 and both are using IIS 7.

I currently have the subdomain mail.example.com pointing to our external IP (170.1.1.1) and then ports 80 and 443 forwarded to the exchange mail server (192.168.0.1) I would like to have web.example.com pointing to the same external IP (170.1.1.1) but have ports 80 and 443 forwarded to a different web server (192.168.0.2) Is there away to do this either through IIS, DNS or my router(Cisco ASA-5505)?

share|improve this question
add comment

3 Answers

A router or firewall can't do what you want, because it only handles TCP/IP traffic, and thus can only forward a given port to a given internal server; what you need is a reverse proxy, which, being able to understand HTTP(S) requests, can forward them to the right web server based on host headers. Microsoft TMG is a product which will happily perform this task.

However, if you are using HTTPS, things will get a little more complex, because only a given SSL certificate can be bound to a given IP address/port pair, so you will need a certificate capable of accepting both names.

share|improve this answer
    
That is just making things unneccessarily complicated, instead of just buying another IP. –  Frederik Nielsen Sep 17 '12 at 18:31
1  
@FrederikNielsen it does answer the question, though. –  MDMarra Sep 17 '12 at 18:32
    
@MDMarra True, but it is still over complicating things :) Thats also why I didn't downvote it. It is a solution, but not the best. –  Frederik Nielsen Sep 17 '12 at 18:33
1  
@FrederikNielsen, I totally agree. But this is what the OP asked for, so I answered it :-) –  Massimo Sep 17 '12 at 18:33
    
You just need a reverse proxy that supports SNI, and for whoever is coming to your web site to not be using IE on Windows XP. –  Michael Hampton Sep 17 '12 at 18:38
show 2 more comments

No.

You cannot forward the same ports to multiple destinations - that is simply not possible.

You would have to buy a few extra IP adresses for it to work.

share|improve this answer
1  
Or use a proxy between the router and servers. No need for additional address. –  John Gardeniers Sep 17 '12 at 20:45
add comment

It's not possible to forward the same port to different host based on the FQDN of a request. DNS lives in the application layer, while port forwarding takes place in the transport layer. See the TCP/IP layer model.

share|improve this answer
add comment

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.