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've got a Windows Server test environment installed as a VM on another company server (e.g. 192.168.2.30) which currently hosts about five different test sites. My local machine contains a line in the hosts file linking the IP address of the test environment to dev.company.com. The first site we made (linked to port 80) works perfectly as it's the default port.

However, we are unable to access our other websites on other ports (i.e. dev.company.com:81), although we can access them just fine on our test environment through 192.168.2.30:81. My understanding is that the hosts file doesn't do anything to ports, which is why I'm confused as to why it wouldn't work as such.

What I want is to be able to create a number of different sites in IIS on different ports, and for users on the same network to be able to access them through the dev.company.com alias by adding the port number at the end.

How can I modify my test environment and my local machines to allow this to work?

EDIT: As stated by joeqwerty it would appear to be a firewall issue. How would I get the Windows Firewall on the server to allow ports 80-100 to be free?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

This sounds like a firewall issue to me. If you can access the sites on those ports from the server itself but you can't access the sites on those ports from another host then I would take a look at the firewall on the server and make sure that incoming connections to those ports are allowed.

share|improve this answer
1  
I've just disabled the firewall and it's working fine now. I've got little experience with the Windows Firewall on WS2008; what would I need to change to allow the ports to be used? –  AlexT Nov 18 '11 at 16:10
    
You need to create a rule in the Windows Firewall with Advanced Security that allows incoming TCP connections to the ports that your web sites are running on. You'lll need to apply the rule to the appropriate network profile (Domain, Private, Public). –  joeqwerty Nov 18 '11 at 16:16

Your network setup is not clear to me. So, your problem can be related to allowed ports between your machine and the testing server. Are you using a proxy in case of port 80? If you provide more info, we can provide you with better answers.

The hosts file just keeps the mappings of IPs and names.

share|improve this answer
    
On my test env I have around five sites on the same IP address on different ports (80-84). I can access these on the test environment by adding the port number to the end of the IP address. However, I want to be able to access these IIS sites on my local machine. I can do this for the site on port 80 (as it is default), but I'd like it so that on my local machine I could access the site by including the port number. –  AlexT Nov 18 '11 at 12:34

I've never done it before (just a theory), but you can try to configure yuor tests sites on test server with the same IP using IIS Host headers feature. And for sure configure your DNS server (or hosts file) to redirect names specified as host headers to your test server IP.

share|improve this answer
    
I've tried doing this (changing them to sitename.company.com and they've failed to work each time. –  AlexT Nov 18 '11 at 12:26

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.