Network Security Groups (NSGs)

Network Security Groups (NSGs) are stateful firewall rules that you can apply to Azure resources. They control inbound and outbound network traffic.

NSG Diagram

Key Features

NSG Rules

NSG rules are configured using a source, destination, port, and protocol. You can also define actions, which can be 'Allow' or 'Deny'.

Source Destination Port Protocol Action
Any Any 80 TCP Allow
192.168.1.0/24 Any 443 TCP Deny

Best Practices