29

I am using Azure platform for a webapp. I need to find out IP address of my web app so that I can whitelist it to an external server where I have created APIs. Is NSLookup the correct way to determine the IP address for whitelisting?

Tommy
  • 39,592
  • 10
  • 90
  • 121
Pawan Singewar
  • 331
  • 1
  • 3
  • 7

7 Answers7

48

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.

enter image description here

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

enter image description here

Tommy
  • 39,592
  • 10
  • 90
  • 121
5

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

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
3

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

enter image description here

You need to open several menu items to display the area that is shown in the screenshot, e.g:

Subscriptions > Pay-As-You-Go > resourceGroups > [ select your resource group ] > providers > Microsoft.Web > Sites > [ select your site ]

Then, in the right panel, search for these properties:

  • outboundIpAddresses
  • possibleOutboundIpAddresses
user1063287
  • 10,265
  • 25
  • 122
  • 218
Jambor - MSFT
  • 3,175
  • 1
  • 13
  • 16
2

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

Vova Bilyachat
  • 18,765
  • 4
  • 55
  • 80
2

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

BenColeman
  • 106
  • 1
  • 7
1

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

juunas
  • 54,244
  • 13
  • 113
  • 149
0

nslookup won't provide an exhaustive list so it is better to use one of the following already mentioned options:

  • powershell
  • azure portal properties view
  • resource portal

I put the above in my personal preferred order based on the fact that the first can be used programmatically to script things, the second is quicker to find (assuming you have been given access) and finally the last is good just buried a bit more.