You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/ip-services/default-outbound-access.md
+35-8Lines changed: 35 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.author: mbender
7
7
ms.service: azure-virtual-network
8
8
ms.subservice: ip-services
9
9
ms.topic: concept-article
10
-
ms.date: 12/03/2025
10
+
ms.date: 01/30/2026
11
11
# Customer intent: "As an Azure network administrator, I want to transition from default outbound access to explicit outbound connectivity for virtual machines, so that I can ensure secure and reliable internet access while avoiding potential disruptions from IP address changes."
12
12
---
13
13
@@ -64,13 +64,34 @@ Additionally,
64
64
65
65
### How to configure private subnets
66
66
67
-
* From the Azure portal, select the subnet and select the checkbox to enable Private subnet as shown:
Manual configuration steps in the Azure portal (no wizard)
70
70
71
-
* Using PowerShell, the following script takes the names of the Resource Group and Virtual Network and loops through each subnet to enable private subnet.
71
+
1. Open the **Azure portal**.
72
+
2. Go to **Virtual networks**.
73
+
3. Select the virtual network that contains the subnet you want to modify.
74
+
4. In the left menu, select **Subnets**.
75
+
5. Select the subnet you want to make private.
76
+
6. Locate the **Default outbound access** setting.
77
+
7. Set **Default outbound access** to **Disabled**.
78
+
8. Select **Save**.
72
79
80
+
This explicitly sets the subnet property:
81
+
82
+
```text
83
+
defaultOutboundAccess = false
73
84
```
85
+
which prevents Azure from assigning default outbound public IPs to virtual machines in this subnet.
86
+
87
+
> [!IMPORTANT]
88
+
> Existing virtual machines must be **stopped and deallocated** for this change to take effect on their network interfaces.
89
+
90
+
# [PowerShell](#tab/powershell)
91
+
92
+
The following script takes the names of the Resource Group and Virtual Network and loops through each subnet to enable private subnet.
93
+
94
+
```powershell
74
95
$resourceGroupName = ""
75
96
$vnetName = ""
76
97
@@ -89,15 +110,19 @@ foreach ($subnet in $vnet.Subnets) {
89
110
Set-AzVirtualNetwork -VirtualNetwork $vnet
90
111
```
91
112
92
-
* Using CLI, update the subnet with [az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update) and set `--default-outbound` to "false"
113
+
# [Azure CLI](#tab/azurecli)
93
114
94
-
```
115
+
Update the subnet with [az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update) and set `--default-outbound` to "false"
0 commit comments