如何查找已接入VPN的Azure WebApp的内部VPN IP地址?
Hey there! I get it—you’ve got your Azure Web App deployed inside a VPN, confirmed the connection is running smoothly, but only keep spotting the external IP across the config page and SCM site. Let’s walk through a few reliable ways to track down that internal VPN IP:
Retrieve via Azure CLI
Open your terminal and run this command, swapping in your actual Web App and resource group names:az webapp show --name <your-webapp-name> --resource-group <your-resource-group> --query "privateIpAddress"
This will spit out the internal IP directly, but only if your Web App is integrated with a VNet.Check Azure Portal’s VNet Integration Details
- Navigate to your Web App’s Networking blade.
- Under the Outbound traffic section, click on the connected VNet integration entry.
- On the VNet integration page, you’ll see the subnet your Web App uses. Click into that subnet, then go to the Connected devices tab—your Web App instance(s) and their corresponding internal IPs will be listed here.
Grab it from the Kudu (SCM) Portal
Access your Web App’s SCM site athttps://<your-webapp-name>.scm.azurewebsites.net, then:- Click Environment in the top navigation bar.
- Scroll through the environment variables until you find
WEBSITE_PRIVATE_IP—that’s exactly the internal VPN IP you’re looking for.
Use Azure PowerShell
If you prefer PowerShell over CLI, run this command:Get-AzWebApp -Name <your-webapp-name> -ResourceGroupName <your-resource-group> | Select-Object PrivateIpAddress
A quick heads-up: Your Web App only gets an internal VPN IP if it’s set up with VNet Integration (either Regional or Gateway mode). If you haven’t configured this, the Web App lives in Azure’s multi-tenant infrastructure and won’t have a dedicated internal VPN IP.
内容的提问来源于stack exchange,提问作者Ziba Leah

