Skip to content

Commit ab4c03e

Browse files
authored
Included NSGenabled and RTenabled
1 parent 08979ef commit ab4c03e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

articles/private-link/disable-private-endpoint-network-policy.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ ms.devlang: azurecli
1414
---
1515
# Manage network policies for private endpoints
1616

17-
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.
17+
By default, network policies are disabled for a subnet in a virtual network. To utilize network policies like User-Defined Routes and Network Security Groups 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.
18+
19+
Network policies can be enabled either for Network Security Groups only, for User-Defined Routes only, or for both.
20+
21+
If you enable network security policies for User-Defined Routes, the /32 routes that are generated by the private endpoint and propagated to all the subnets in its own VNet and directly peered VNets will be invalidated if you have User-Defined Routing, which is useful if you want all traffic (including traffic addressed to the private endpoint) to go through a firewall, since otherwise the /32 route would bypass any other route.
1822

1923
You can use the following to enable or disable the setting:
2024

2125
* Azure portal
22-
2326
* Azure PowerShell
24-
2527
* Azure CLI
26-
2728
* Azure Resource Manager templates
2829

2930
The following examples describe how to enable and disable `PrivateEndpointNetworkPolicies` for a virtual network named **myVNet** with a **default** subnet of **10.1.0.0/24** hosted in a resource group named **myResourceGroup**.
@@ -42,7 +43,7 @@ The following examples describe how to enable and disable `PrivateEndpointNetwor
4243

4344
5. Select the **default** subnet.
4445

45-
6. In the properties for the **default** subnet, select **Enabled** in **NETWORK POLICY FOR PRIVATE ENDPOINTS**.
46+
6. In the properties for the **default** subnet, enable the checkboxes for "Network Security Groups", "Route tables" or both in **NETWORK POLICY FOR PRIVATE ENDPOINTS**.
4647

4748
7. Select **Save**.
4849

@@ -61,7 +62,7 @@ $sub = @{
6162
Name = 'default'
6263
VirtualNetwork = $vnet
6364
AddressPrefix = '10.1.0.0/24'
64-
PrivateEndpointNetworkPoliciesFlag = 'Enabled'
65+
PrivateEndpointNetworkPoliciesFlag = 'Enabled' # Can be either 'Disabled', 'NetworkSecurityGroupEnabled', 'RouteTableEnabled', or 'Enabled'
6566
}
6667
Set-AzVirtualNetworkSubnetConfig @sub
6768
@@ -70,7 +71,7 @@ $vnet | Set-AzVirtualNetwork
7071

7172
# [**CLI**](#tab/network-policy-cli)
7273

73-
Use [az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update) to enable the policy.
74+
Use [az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update) to enable the policy. The Azure CLI only supports the values `true` or `false`, it does not allow yet to enable the policies selectively only for User-Defined Routes or Network Security Groups:
7475

7576
```azurecli
7677
az network vnet subnet update \
@@ -82,7 +83,7 @@ az network vnet subnet update \
8283

8384
# [**JSON**](#tab/network-policy-json)
8485

85-
This section describes how to enable subnet private endpoint policies using an Azure Resource Manager template.
86+
This section describes how to enable subnet private endpoint policies using an Azure Resource Manager template. The possible values for the `privateEndpointNetworkPolicies` are `Disabled`, `NetworkSecurityGroupEnabled`, `RouteTableEnabled`, and `Enabled`.
8687

8788
```json
8889
{

0 commit comments

Comments
 (0)