How to allow incoming web traffic to a web server in an Azure VM (using Azure Resource Manager)
Preliminary I assume you have an Azure VM running with a web server and have the port configured in your firewall of your operating system. In my example I use a Windows Server 2012 with Internet Information Services (IIS) and have configured port 8080 for incoming traffic.
Further, I assume the VM is set up using the new portal (https://portal.azure.com) as an Azure Resource Manager (ARM) deployment and not using the old portal (https://manage.windowsazure.com) and not as a classic deployment. (Follow this link to find a explanation how to do set up ports for a classic deployment.)
- In the Azure Portal go to the VM running the web server and click on "All settings".
- Select "Network interfaces" and select the network interface with the public IP address. (Probably there is only one.)
- Select the "Network security group" and click on "All settings".
- Select "Inbound security rules".
- Click "Add" and create a new inbound rule with the following settings:
- Name: any name, e.g. "Web"
- Priority: any number lower 65500
- Source: any or Internet
- Protocol: any or TCP
- Source port range: * (important!)
- Destination: Any
- Destination port range: 8080 (web server's configured port)
- Action: Allow