Network Security Group (NSG) is the next component we need to take care of. It is essentially access control lists that are associated with a subnet. It also provides port forwarding to the virtual machines or containers. The rules are applied to all interfaces that are attached to the subnet.
The first step is to create an NSG:
New-AzureRMNetworkSecurityGroup ` -ResourceGroupName <resource group>` -Location <location> -Name <nsg name>
For example:
$myNSG = New-AzureRMNetworkSecurityGroup ` -ResourceGroupName $myRG -Location $myLocation -Name myNSG1
In the enormous output, you can find several sections; one of the sections is named Default Security Rules. This section contains a set of rules, given in order of priority: ...