2

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?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
AlexT
  • 123
  • 4

3 Answers3

1

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.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • 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
0

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.

Khaled
  • 35,688
  • 8
  • 69
  • 98
  • 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
0

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.

Sergey
  • 2,091
  • 15
  • 14
  • 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