Skip to content

Commit e501fd6

Browse files
committed
initial
1 parent 24716ee commit e501fd6

File tree

2 files changed

+121
-13
lines changed

2 files changed

+121
-13
lines changed
152 KB
Loading

articles/app-service/overview-inbound-outbound-ips.md

Lines changed: 121 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how inbound and outbound IP addresses are used in Azure App S
44
author: msangapu-msft
55
ms.author: msangapu
66
ms.topic: article
7-
ms.date: 03/10/2025
7+
ms.date: 06/16/2025
88
ms.custom:
99
- UpdateFrequency3
1010
- build-2025
@@ -18,24 +18,24 @@ ms.custom:
1818

1919
## How IP addresses work in App Service
2020

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.
2222

2323
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.
2424

2525
> [!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.
2727
2828
## When inbound IP changes
2929

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:
3131

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).
3434
- Delete an existing IP-based TLS binding, such as during certificate renewal (see [Renew certificate](configure-ssl-certificate.md#renew-an-expiring-certificate)).
3535

3636
## Find the inbound IP
3737

38-
Just run the following command in a local terminal:
38+
Run the following command in a local terminal:
3939

4040
```bash
4141
nslookup <app-name>.azurewebsites.net
@@ -45,15 +45,123 @@ nslookup <app-name>.azurewebsites.net
4545

4646
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.
4747

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.
81+
82+
```azurecli-interactive
83+
# Configure IPv6 only
84+
az resource update --name <app-name> --set properties.ipMode="IPv6" -g <resource-group-name> --resource-type "Microsoft.Web/sites"
85+
86+
# 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.":::
95+
96+
# [Azure Resource Manager Template](#tab/arm-template)
97+
98+
To deploy a new app or update an existing app using an Azure Resource Manager (ARM) template, set the `IPMode` to either "IPv6" or "IPv4AndIPv6".
99+
100+
```json
101+
{
102+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
103+
"contentVersion": "1.0.0.0",
104+
"variables": {
105+
"appName": "APP-SERVICE-NAME",
106+
"appIPMode": "IPv6",
107+
"appServicePlanName": "PLAN-NAME",
108+
"location": "[resourceGroup().location]"
109+
},
110+
"resources": [
111+
{
112+
"name": "[variables('appName')]",
113+
"type": "Microsoft.Web/sites",
114+
"apiVersion": "2021-03-01",
115+
"location": "[variables('location')]",
116+
"dependsOn": [
117+
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
118+
],
119+
"properties": {
120+
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]",
121+
"httpsOnly": true,
122+
"ipMode": "[variables('appIPMode')]"
123+
}
124+
}
125+
]
126+
}
127+
```
128+
129+
---
130+
131+
### Test IPv6 connectivity
132+
133+
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+
48156
## When outbound IPs change
49157

50158
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.
51159

52160
The set of outbound IP addresses for your app changes when you perform one of the following actions:
53161

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).
57165

58166
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).
59167

@@ -89,13 +197,13 @@ For function apps, see [Function app outbound IP addresses](/azure/azure-functio
89197

90198
## Get a static outbound IP
91199

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).
93201

94202
## IP Address properties in Azure portal
95203

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**.
97205

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.
99207

100208
:::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.":::
101209

0 commit comments

Comments
 (0)