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
@@ -4,7 +4,7 @@ description: Learn how inbound and outbound IP addresses are used in Azure App S
4
4
author: msangapu-msft
5
5
ms.author: msangapu
6
6
ms.topic: article
7
-
ms.date: 03/10/2025
7
+
ms.date: 06/16/2025
8
8
ms.custom:
9
9
- UpdateFrequency3
10
10
- build-2025
@@ -18,24 +18,24 @@ ms.custom:
18
18
19
19
## How IP addresses work in App Service
20
20
21
-
An App Service app runs in an App Service plan, and App Service plans are deployed into one of the deployment units in the Azure infrastructure (internally called a webspace). Each deployment unit is assigned a set of virtual IP addresses, which includes one public inbound IP address and a set of [outbound IP addresses](#find-outbound-ips). All App Service plans in the same deployment unit, and app instances that run in them, share the same set of virtual IP addresses. For an App Service Environment (an App Service plan in [Isolated tier](https://azure.microsoft.com/pricing/details/app-service/)), the App Service plan is the deployment unit itself, so the virtual IP addresses are dedicated to it as a result.
21
+
An App Service app runs in an App Service plan, and App Service plans are deployed into one of the deployment units in the Azure infrastructure (internally called a webspace). Each deployment unit is assigned to a set of virtual IP addresses, which includes one public inbound IP address and a set of [outbound IP addresses](#find-outbound-ips). All App Service plans in the same deployment unit, and app instances that run in them, share the same set of virtual IP addresses. For an App Service Environment (an App Service plan in [Isolated tier](https://azure.microsoft.com/pricing/details/app-service/)), the App Service plan is the deployment unit itself, so the virtual IP addresses are dedicated to it as a result.
22
22
23
23
Because you're not allowed to move an App Service plan between deployment units, the virtual IP addresses assigned to your app usually remain the same, but there are exceptions.
24
24
25
25
> [!NOTE]
26
-
> The Premium V4 tier does not provide a stable set of outbound IP addresses. This behavior is intentional. Although applications running on the Premium V4 tier can make outbound calls to internet-facing endpoints, the App Service platform does not provide a stable set of outbound IP addresses for the Premium V4 tier. This is a change in behavior from previous App Service pricing tiers. The portal will show "Dynamic" for outbound IP addresses and additional outbound IP addresses information for applications using Premium V4. ARM and CLI calls will return empty strings for the values of *outboundIpAddresses* and *possibleOutboundIpAddresses*. If applications running on Premium V4 require a stable outbound IP address(es), developers will need to use a solution like [Azure NAT Gateway](overview-nat-gateway-integration.md) to get a predictable IP address for outbound internet-facing traffic.
26
+
> The Premium V4 tier doesn't provide a stable set of outbound IP addresses. This behavior is intentional. Although applications running on the Premium V4 tier can make outbound calls to internet-facing endpoints, the App Service platform doesn't provide a stable set of outbound IP addresses for the Premium V4 tier. This behavior is a change in behavior from previous App Service pricing tiers. The portal shows "Dynamic" for outbound IP addresses and additional outbound IP addresses information for applications using Premium V4. Azure Resource Manager (ARM) and CLI calls return empty strings for the values of *outboundIpAddresses* and *possibleOutboundIpAddresses*. If applications running on Premium V4 require a stable outbound IP address or addresses, developers need to use a solution like [Azure NAT Gateway](overview-nat-gateway-integration.md) to get a predictable IP address for outbound internet-facing traffic.
27
27
28
28
## When inbound IP changes
29
29
30
-
Regardless of the number of scaled-out instances, each app has a single inbound IP address. The inbound IP address may change when you perform one of the following actions:
30
+
Regardless of the number of scaled-out instances, each app has a single inbound IP address. The inbound IP address might change when you perform one of the following actions:
31
31
32
-
- Delete an app and recreate it in a different resource group (deployment unit may change).
33
-
- Delete the last app in a resource group _and_ region combination and recreate it (deployment unit may change).
32
+
- Delete an app and recreate it in a different resource group (deployment unit might change).
33
+
- Delete the last app in a resource group _and_ region combination and recreate it (deployment unit might change).
34
34
- Delete an existing IP-based TLS binding, such as during certificate renewal (see [Renew certificate](configure-ssl-certificate.md#renew-an-expiring-certificate)).
35
35
36
36
## Find the inbound IP
37
37
38
-
Just run the following command in a local terminal:
Sometimes you might want a dedicated, static IP address for your app. To get a static inbound IP address, you need to [secure a custom DNS name with an IP-based certificate binding](./configure-ssl-bindings.md). If you don't actually need TLS functionality to secure your app, you can even upload a self-signed certificate for this binding. In an IP-based TLS binding, the certificate is bound to the IP address itself, so App Service creates a static IP address to make it happen.
47
47
48
+
## Inbound IPv6 support
49
+
50
+
Azure App Service supports IPv6 for inbound traffic. Apps can receive traffic over both IPv4 and IPv6 protocols, providing compatibility with modern networks and clients that require IPv6 connectivity.
51
+
52
+
> [!NOTE]
53
+
> Outbound IPv6 isn't supported. All outbound connections from your app use IPv4.
54
+
55
+
### Prerequisites
56
+
57
+
To use IPv6 inbound traffic, you need:
58
+
59
+
- An IPv6 address that accepts incoming traffic
60
+
- A DNS record that returns an IPv6 (AAAA) record
61
+
- A client that can send and receive IPv6 traffic
62
+
63
+
> [!IMPORTANT]
64
+
> Many local networks and development environments only support IPv4, which might affect your ability to test IPv6 connectivity from your local machine.
65
+
66
+
### How IPv6 addressing works
67
+
68
+
All App Service deployment units include IPv6 addresses, enabling your app to receive traffic on both IPv4 and IPv6 addresses. For backward compatibility, the DNS response for the default hostname (`<app-name>.azurewebsites.net`) returns only the IPv4 address by default.
69
+
70
+
You can configure the IP mode behavior using the `IPMode` property:
71
+
72
+
-**IPv4** (default): DNS returns IPv4 address only
73
+
-**IPv6**: DNS returns IPv6 address only
74
+
-**IPv4AndIPv6**: DNS returns both IPv4 and IPv6 addresses
75
+
76
+
### Configure IPv6 support
77
+
78
+
# [Azure CLI](#tab/azure-cli)
79
+
80
+
To update an app to return IPv6 DNS records in the Azure CLI, run the following command.
# To update a slot, you need to provide the resource ID of the slot
87
+
az resource update --ids '/subscriptions/<sub-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Web/sites/<app-name>/slots/<slot-name>' --set properties.ipMode='IPv6'
88
+
```
89
+
90
+
# [Azure portal](#tab/azure-portal)
91
+
92
+
To update an app to return IPv6 DNS records in the Azure portal, go to the **Configuration** page for the App Service app and set the **Inbound IP mode** property.
93
+
94
+
:::image type="content" source="./media/overview-inbound-outbound-ips/ip-mode-configuration.png" alt-text="Screenshot that shows how the inbound IP mode is set in the App Service configuration page.":::
To test IPv6 connectivity to your app, use the following curl command:
134
+
135
+
```bash
136
+
curl -6 https://<app-name>.azurewebsites.net
137
+
```
138
+
139
+
### Custom domains and IPv6
140
+
141
+
When using custom domains, you can configure DNS records to support IPv6:
142
+
143
+
-**IPv6 only**: Add an AAAA record pointing to your app's IPv6 address. Clients must support IPv6.
144
+
-**Dual-stack**: Add both A (IPv4) and AAAA (IPv6) records, or use a CNAME record to the default hostname, which inherits the `IPMode` behavior.
145
+
146
+
### IPv6 considerations
147
+
148
+
Consider the following factors when implementing IPv6 support:
149
+
150
+
-**Compatibility**: Use `IPv4AndIPv6` mode for maximum client compatibility
151
+
-**Testing**: Verify that your network infrastructure and test environments support IPv6
152
+
-**Client support**: Ensure your application clients can handle IPv6 addresses
153
+
-**Outbound traffic**: Remember that outbound connections always use IPv4
154
+
-**Client testing**: To ensure propert functionality, test your application with both IPv4 and IPv6 clients
155
+
48
156
## When outbound IPs change
49
157
50
158
Regardless of the number of scaled-out instances, each app has a set number of outbound IP addresses at any given time. Any outbound connection from the App Service app, such as to a back-end database, uses one of the outbound IP addresses as the origin IP address. The IP address to use is selected randomly at runtime, so your back-end service must open its firewall to all the outbound IP addresses for your app.
51
159
52
160
The set of outbound IP addresses for your app changes when you perform one of the following actions:
53
161
54
-
- Delete an app and recreate it in a different resource group (deployment unit may change).
55
-
- Delete the last app in a resource group _and_ region combination and recreate it (deployment unit may change).
56
-
- Scale your app between the lower tiers (**Basic**, **Standard**, and **Premium**), the **PremiumV2** tier, the **PremiumV3** tier, and the **Pmv3** options within the **PremiumV3** tier (IP addresses may be added to or subtracted from the set).
162
+
- Delete an app and recreate it in a different resource group (deployment unit might change).
163
+
- Delete the last app in a resource group _and_ region combination and recreate it (deployment unit might change).
164
+
- Scale your app between the lower tiers (**Basic**, **Standard**, and **Premium**), the **PremiumV2** tier, the **PremiumV3** tier, and the **Pmv3** options within the **PremiumV3** tier (IP addresses might be added to or subtracted from the set).
57
165
58
166
You can find the set of all possible outbound IP addresses your app can use, regardless of pricing tiers, by looking for the `possibleOutboundIpAddresses` property or in the **Additional Outbound IP Addresses** field in the **Properties** page in the Azure portal. See [Find outbound IPs](#find-outbound-ips).
59
167
@@ -89,13 +197,13 @@ For function apps, see [Function app outbound IP addresses](/azure/azure-functio
89
197
90
198
## Get a static outbound IP
91
199
92
-
You can control the IP address of outbound traffic from your app by using virtual network integration together with a virtual network NAT gateway to direct traffic through a static public IP address. [Virtual network integration](./overview-vnet-integration.md) is available on **Basic**, **Standard**, **Premium**, **PremiumV2**, and **PremiumV3** App Service plans. To learn more about this setup, see [NAT gateway integration](./networking/nat-gateway-integration.md).
200
+
You can control the IP address of outbound traffic from your app by using virtual network integration and a virtual network NAT gateway to direct traffic through a static public IP address. [Virtual network integration](./overview-vnet-integration.md) is available on **Basic**, **Standard**, **Premium**, **PremiumV2**, and **PremiumV3** App Service plans. To learn more about this setup, see [NAT gateway integration](./networking/nat-gateway-integration.md).
93
201
94
202
## IP Address properties in Azure portal
95
203
96
-
IP Addresses appear in multiple places in Azure portal. The properties page will show you the raw output from `inboundIpAddress`, `possibleInboundIpAddresses`, `outboundIpAddresses`, and `possibleOutboundIpAddresses`. The overview page will also show the same values, but not include the **Possible Inbound IP Addresses**.
204
+
IP Addresses appear in multiple places in Azure portal. The properties page shows you the raw output from `inboundIpAddress`, `possibleInboundIpAddresses`, `outboundIpAddresses`, and `possibleOutboundIpAddresses`. The overview page also shows the same values, but not include the **Possible Inbound IP Addresses**.
97
205
98
-
Networking overview shows the combination of **Inbound IP Address** and any private endpoint IP addresses in the **Inbound addresses** field. If public network access is disabled, the public IP address won't be shown. The **Outbound addresses** field has a combined list of **(Possible) Outbound IP Addresses**, and if the app is virtual network integrated and is routing all traffic, and the subnet has a NAT gateway attached, the field will also include the IP addresses from the NAT gateway.
206
+
Networking overview shows the combination of **Inbound IP Address** and any private endpoint IP addresses in the **Inbound addresses** field. If public network access is disabled, the public IP address isn't shown. The **Outbound addresses** field has a combined list of **(Possible) Outbound IP Addresses**, and if the app is virtual network integrated and is routing all traffic, and the subnet has a NAT gateway attached, the field also includes the IP addresses from the NAT gateway.
99
207
100
208
:::image type="content" source="./media/overview-inbound-outbound-ips/networking-overview.png" alt-text="Screenshot that shows how IP addresses are shown in the networking overview page.":::
0 commit comments