You can use an NSG to filter network traffic to and from Azure resources that reside in an Azure virtual network. An NSG is an access control list inside Azure where you can add inbound and outbound security rules that allow or deny traffic from several types of resources.
When a connection is established between VMS, VNets, or other cloud services, this list is checked to see whether the connection is allowed or denied. NSGs can be applied to one or more subnets or individual NICs. This means that all resources that are associated with this subnet or NIC will automatically have all the rules applied. NSG rules are processed in priority order using the five-tuple information (source, source port, destination, destination port, and protocol) to allow or deny traffic. They are evaluated by priority, with lower numbers before higher numbers, and they can be applied to inbound...