Port 80 connection timeout on new Azure VM with NSG settings

I just created a new Ubuntu 14.04 virtual machine in Microsoft Azure using the (recommended) resource manager deployment model. The following screenshots show the deployment configuration and resulting resources:

enter image description here

Once it was deployed, I accessed the VM using SSH through the public IP address, logged in and installed nginx. I left it with the default setting and made "curl localhost" to make the web server work.

Then I went to the network security group resource and added the β€œAllow” rule for port 80 for the Inbox rules:

enter image description here

Then I opened the browser and tried to request the public IP address associated with the network adapter, and got a connection timeout.

Edit: I can access by disconnecting the NSG from the NIC, but if I reassociate it, I will be blocked again after a few minutes.

I tried using the same process to configure a Windows Server virtual machine using IIS, but I get the same result.

What am I missing here?

I do not get errors when performing the same setup using the classic deployment model, this only happens when I try to use the recommended resource manager model.

+6
source share
2 answers

What is your source port on your NSG? Did you leave him Any / *? If you do not limit yourself to traffic only from this port.

+6
source

For those who are still struggling with incoming rules on the new Azure portal, you need to configure the Network Security Group (NSG) to:

  • Allow connections from (source):
Sources

any

and

* - for the range of source ports (extremely important, since it may seem normal to install 80 or 443 - which is wrong)

  • destination:

any

and

80 - as a range of destination ports (or the port your web server is listening on), it could also be 8080 or another)

The same goes for other ports, such as 443 for https connections.

enter image description here

+8
source

All Articles