Network security groups (NSGs) support for private endpoints is now generally available. This feature enhancement provides you with the ability to enable advanced security controls on traffic destined to a private endpoint. In order to leverage this feature, you will need to set a specific subnet level property, called PrivateEndpointNetworkPolicies, to enabled on the subnet containing private endpoint resources.
By default, network policies are disabled for a subnet in a virtual network. To utilize network policies like UDR and NSG support, network policy support must be enabled for the subnet. This setting is only applicable to private endpoints within the subnet. This setting affects all private endpoints within the subnet. For other resources in the subnet, access is controlled based on security rules in the network security group.
Enable Network Policy:
- Sign-in to the Azure portal.
- In the search box at the top of the portal, enter Virtual network. Select Virtual networks.
- Select myVNet.
- In settings of myVNet, select Subnets.
- Select the default subnet.
- In the properties for the default subnet, select Enabled in NETWORK POLICY FOR PRIVATE ENDPOINTS.
- Select Save.