Network Security Group

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: ...

Get Hands-On Linux Administration on Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.