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

I've got a Windows Server test environment installed as a VM on another company server (e.g. 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 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., although we can access them just fine on our test environment through 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 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?


locked by HopelessN00b Jan 21 '15 at 21:42

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Jan 21 '15 at 21:42

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question is off-topic under current topicality rules. – HopelessN00b Jan 21 '15 at 21:42
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.

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.

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.

I've tried doing this (changing them to and they've failed to work each time. – AlexT Nov 18 '11 at 12:26

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