How to determine the IP address of Azure hosted in WebApp

I am using the Azure platform for webapp. I need to find out the IP address of my web application so that I can redirect it to the external server where I created the API. Is NSLookup the right way to determine the IP address for a whitelist?

+12
source share
7 answers

The fastest way is to log in to the Azure portal and select your web application from the resources menu. Once you open the blade for your web application, there are two types of IP addresses. Inbox and outbox. For the outbound IP address, click properties on the resource menu. This will display a list of all possible outgoing IP addresses.

enter image description here

For the incoming IP address, click "User Domains" in the properties menu, and the external IP address will appear there.

enter image description here

+22
source

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

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

for me it returns a bunch of IP addresses

+2
source

In the web application → Properties → OUTBOUND IP ADDRESSES It will have a list of outgoing ip, which should be white.

+2
source

We can also find outgoing Ip addresses to an Azure resource resource , as shown in the following screenshot:

enter image description here

+1
source

Powershell snippet for this:

$ Webapp = Get-AzureRmWebApp ResourceGroupName "Specify the name of the resource group" -Name "Specify the name of the web application"

$ Webapp.OutboundIpAddresses

+1
source

Run nslookup yourapp.azurewebsites.net at the Windows command prompt.

0
source

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

0
source

Source: https://habr.com/ru/post/1259467/


All Articles