3

I am unable to get an Azure VM running Windows Server 2012 to serve up the IIS default website from it's public static IP.

  1. Created a VM running Win Server 2012 R2 and installed web server role.

  2. Browse to localhost and can see the default website is working

  3. In Azure, configured the VM to have a Public Static IP address and added DNS name to azure which is publicly resolving to the static IP.

  4. In Azure, configured a Security Group for the VM network interface and added the following rules:

    allow-http    source: any    source port: 80    dest: any    dest port: 80    service: tcp/80    action: allow
    allow-https    source: any    source port: 80    dest: any    dest port: 80    service: tcp/443    action: allow
    
  5. In Windows Firewall settings, made sure the rules to allow HTTP and HTTPS traffic are enabled. (I have also tried disabling the firewall entirely).

  6. In IIS make sure the default website is bound to any IP address.

When I try to connect to the VM static IP address, e.g.: http://MY.PUBLIC.STATIC.IP, I cant connect at all. I can't PING the server either.

Any ideas on what I am doing wrong?

  • Can you plz make sure which IP you are using. As once I faced such issue.I checked 3 things IP address: VIP or PIP . I hope you are having right IP but still make sure that you are using same IP which Azure cloud service has (VM hosted cloud service) IIS server : Another thing check for rule in IIS, I reconfigured services in IIS. Host file: And host entry It worked for me. – Kunal Feb 1 '16 at 9:50
  • I specified a static public IP address when configuring the server and it has been assigned. I also added a DNS name in Azure which publicly resolves to the correct IP address but still no response from the server. I have been waiting for Microsoft to call me (over 24 hours now) to try and resolve the issue. – George Filippakos Feb 1 '16 at 20:41
5

You are limiting incoming connection to port 80 only. Client browsers can use a port number ranging from 1024 and 65536 for their outgoing connection.

You need to change your security group settings to allow incoming connections from Any port:

allow-http    source: any    source port: any    dest: any    dest port: 80    service: tcp/80    action: allow
allow-https    source: any    source port: any    dest: any    dest port: 80    service: tcp/443    action: allow
0

Instead of specifying "any" against 'destination port' in both of your rules, you need to specify port "80" and "443" as destination ports.

With that, when you put http://MY.PUBLIC.STATIC.IP your traffic will reach port 80; and when you put https://MY.PUBLIC.STATIC.IP your traffic will reach 443.

From this Microsoft's link, check the sub-topic 'NSG for FrontEnd subnet'.

  • Apologies, I did not write down the rules clearly, I am already specifying source and destination ports, the 'any' values were related to the source and destination address and not the ports (have modified the question to clarify) – George Filippakos Feb 1 '16 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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