Understanding NSGs
Virtual networks in Azure are used for segmentation and security boundaries for resources, but alone cannot be configured to define more granular access when it comes to defining which protocol and which port can be used for communication. To establish that level of control, you will need to use NSGs. This section is meant to give you a general overview of that resource type and possible use cases.
How do NSGs work?
Azure NSGs are a way to filter incoming and outgoing traffic for Azure networks. They allow you to decide how traffic should be handled depending on ports, protocols, or origin of traffic. NSGs can be assigned to either network interfaces or subnets, giving you flexible setup and granular configuration options.
It’s important to remember that NSGs work differently depending on the resource to which they are attached. However, all instances of that service share some common features, which are set out as follows:
- DenyAllInbound...