Network Security Groups
When deploying resources on virtual networks within Azure, it is recommended from a security point of view to only allow the required traffic to your resource. One of the solutions on the Azure platform for traffic filtering is NSGs. Traffic filtering is the activity of allowing or denying traffic based on a set of predefined rules, helping to control inbound and outbound traffic to and from your Azure resources. NSGs act as a basic five-tuple firewall service for network-connected resources. These can be either applied at the subnet layer or Network Interface Card (NIC) layer in Azure. NICs are typically associated directly with VMs but can also be from services with a private endpoint attached. NSG rules are the configurations for traffic filtering patterns and are defined by the following components: source, destination, port, protocol, and action (deny or allow).
Each rule is given a priority, and the lower the priority number, the higher the precedence...