Enable IPv6 on Azure Web App
Hi All,
One of my Websites is running on Azure Web App. I was recently looking into how to enable IPv6 for the Website. Here is what i found out.
In November 2024 Microsoft has anounced the Public Preview for Inbound IPv6 Traffic on Azure Web Apps.
Azure Portal
In the Azure Portal under Configuration you can select between:
- IPv4
- IPv6
- IPv4 and IPv6
I’ve selected “IPv4 and IPv6”
In the “Overview” Pane you can see de default domain “icewolf.azurewebsites.net”
If you do a DNS Lookup you get the IPv4 and the IPv6 Address returned
nslookup icewolf.azurewebsites.net
Now you need only to add custom Domains and Certificates to your Azure Web App (i’ve done that already).
And in DNS you need to add the DNS A and AAAA (for IPv6) Records - if you want to be able to use “icewolf.ch” without the “www” prefix
The “www” Record is a CNAME and that resolves to IPv4 and IPv6
AZ Powershell
Connect to Azure with AZ PowerShell
Connect-AzAccount -Tenant icewolfch.onmicrosoft.com
List the Azure Subscriptions
Get-AzSubscription -TenantId "46bbad84-29f0-4e03-8d34-f6841a5071ad"
Select the Subscription
Select-AzSubscription "1e467fc0-3227-4628-a048-fc5ef79bff93"
I’ve tried with the Get-AzWebApp
Get-AzWebApp -ResourceGroupName "RG_PROD_MPN" -Name "icewolf"
I’ve also checked the SiteConfig - but the IP Configuration was nowhere to find
$WebApp = Get-AzWebApp -ResourceGroupName "RG_PROD_MPN" -Name "icewolf"
$WebApp.SiteConfig
Let’s try then the API Calls with Invoke-AzRestMethod
Here we can find the Property “ipMode”
#Variables
$SubscriptionId = "1e467fc0-3227-4628-a048-fc5ef79bff93"
$ResourceGroupName = "RG_PROD_MPN"
$Name = "icewolf"
#Get WebApp Properties
$URI = "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name/`?api-version=2024-11-01"
$Result = Invoke-AzRestMethod -Method "GET" -Path $URI
$Object = $result.content | ConvertFrom-Json
$Object.properties.ipMode
$Object.properties.inboundIpAddress
$Object.properties.inboundIpv6Address
How can you update the Website?
You can use the following command with the ipMode Property and one of the following Values: IPv4, IPv4AndIPv6, IPv6
#Variables
$SubscriptionId = "1e467fc0-3227-4628-a048-fc5ef79bff93"
$ResourceGroupName = "RG_PROD_MPN"
$Name = "icewolf"
#IPv4, IPv4AndIPv6, IPv6
$Body = @"
{
"properties": {
"ipMode": "IPv4AndIPv6"
}
}
"@
#Patch WebApp Properties
$URI = "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name/`?api-version=2024-11-01"
Invoke-AzRestMethod -Method "PATCH" -Path $URI -Payload $Body
AZ CLI
Or you can use AZ CLI
Login to Azure
az login --tenant icewolfch.onmicrosoft.com
I’ve tried this but no “ipMode” Property
az webapp show --name "icewolf" --resource-group "RG_PROD_MPN"
I’ve tried this but no “ipMode” Property
az webapp config show --name "icewolf" --resource-group "RG_PROD_MPN"
Also here we can use the Azure Management API
#Variables
$SubscriptionId = "1e467fc0-3227-4628-a048-fc5ef79bff93"
$ResourceGroupName = "RG_PROD_MPN"
$Name = "icewolf"
az resource show --ids "/subscriptions/$subscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name" --query "properties.ipMode"
az resource show --ids "/subscriptions/$subscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name" --query "properties.inboundIpAddress"
az resource show --ids "/subscriptions/$subscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name" --query "properties.inboundIpv6Address"
Update with the follwoing command
#Variables
$SubscriptionId = "1e467fc0-3227-4628-a048-fc5ef79bff93"
$ResourceGroupName = "RG_PROD_MPN"
$Name = "icewolf"
#Update
az resource update --ids "/subscriptions/$subscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Web/sites/$Name" --set properties.ipMode='IPv4AndIPv6' #IPv4, IPv4AndIPv6, IPv6
Switch DNS Resilience Dashboard
Now my Domain is fully complieant on the Switch DNS Resilience Dashboard
- Azure DNS finally supports DNSSEC (Preview) exchange-online-DANE-inbound-preview/)
- SPF / DKIM / DMARC
- DMARC Advisor
- Exchange Online DANE Inbound Preview
- And now my Website supports also IPv6 😍
Summary
I did not expect after almost a year to still have to use the Azure Management API’s. But since it’s not GA yet, i can understand the Situation. Anyway the Situation could be better, as it took me a while to figure out, that it is only possible with the Azure Management API.
Regards
Andres Bohren






















