How can I determine the IP address of an Azure hosted WebApp

烈酒焚心 提交于 2019-11-30 08:48:11

The quickest way would be to login to the Azure portal and select your web app from the resources menu. Once you have the blade open for your web application there are two types of IP addresses. Inbound and outbound. For outbound IP, click properties from the resources menu. This will display a list of all possible outbound IP addresses.

For inbound IP address, click on Custom Domains from the properties menu and your external IP will appear there.

Well, that would be one way, but PowerShell would be better.

Get-AzureRmWebApp -Name $WebAppName$
$webapp.outboundipaddresses

for me it returns a bunch of IP addresses

In web app -> Properties -> OUTBOUND IP ADDRESSES It will have list of outbound ip which should be whitelisted

We can also find the outbound Ip Addresses at Azure resource portal, like the following screenshot:

Powershell snippet for it:

$Webapp = Get-AzureRmWebApp ResourceGroupName "Provide Resource group name" -Name "Provide web app name"

$Webapp.OutboundIpAddresses

Run nslookup yourapp.azurewebsites.net in a Windows command prompt.

With the new Azure CLI (v2) it's very easy
az webapp show -n mywebsite -g MyResGroup --query "outboundIpAddresses"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!