

Single port number from 1 to 65535, port range (i.e. Multiple ports or port ranges cannot be grouped by a commaĭestination port range to match for the rule Try to use port ranges as much as possible to avoid the need for multiple rules Unless your client program is using a specific port, please use "*" in most cases.

Using * as a protocol includes ICMP (East-West traffic only), as well as UDP and TCP and may reduce the number of rules you needĪt the same time, using * might be too broad an approach, so make sure you only use when really necessary You may have several rules within an NSG, so make sure you follow a naming convention that allows you to identify the function of your rule NSG rules contain the following properties. For information about how to do this, see Managing Access Control Lists (ACLs) for Endpoints by using PowerShell. If you want to use an NSG and have an endpoint ACL already in place, first remove the endpoint ACL. Endpoint-based ACLs and network security groups are not supported on the same VM instance.

Rules that define what traffic is allowed, or denied You may consider grouping the NSG with resources it is associated to Resource groups are used to manage multiple resources together, as a deployment unit See limits below to understand how many NSGs you can have in a regionĪlthough an NSG belongs to a resource group, it can be associated to resources in any resource group, as long as the resource is part of the same Azure region as the NSG NSGs can only be applied to resources within the region it is created Since you may need to create several NSGs, make sure you have a naming convention that makes it easy to identify the function of your NSGs Must end with a letter, number, or underscore PropertyĬan contain letters, numbers, underscores, periods and hyphens

In addition, traffic to an individual VM can be restricted further by associating a NSG directly to that VM. When a NSG is associated with a subnet, the ACL rules apply to all the VM instances in that subnet. NSGs can be associated with either subnets or individual VM instances within that subnet. Network security group (NSG) contains a list of Access Control List (ACL) rules that allow or deny network traffic to your VM instances in a Virtual Network.
