1
votes

1.firstly I integrate VNET with APP service 2.to route traffic to VNet, I add WEBSITE_VNET_ROUTE_ALL with value 1 in App service settings. 3.I created NATgateway and attached it to the subnet 4.I also create a route and attached it to the subnet in that route I gave the address prefix as VNET address space and Next hop type I select virtual appliance and in Next hop address I add NAT gateway public IP

note: I used the below link for reference https://sakaldeep.com.np/1159/azure-nat-gateway-and-web-app-vnet-integration-to-get-static-outbound-ip

after doing all above steps and I checked with below command I did.nt get NAT gateway IP as result az webapp show --resource-group <group_name> --name <app_name> --query outboundIpAddresses --output tsv

1
Do you use Azure DevOps (dev.azure.com/xxxx)? It seems you issue is not related to Azure DevOps~Cece Dong - MSFT

1 Answers

0
votes

Azure App Service is a multi-tenant service. All App Service plans in the same deployment unit, and app instances that run in them, share the same set of virtual IP addresses. When you run

az webapp show --resource-group <group_name> --name <app_name> --query outboundIpAddresses --output tsv

you just get the Outbound IP Addresses Properties of your web app. You can find all possible outbound IP addresses for your app, regardless of pricing tiers, click Properties in your app's left-hand navigation. They are listed in the Additional Outbound IP Addresses field. The above outbound IP addresses will not change.

But if you send a request from your web app within a VNet over the internet, you should find the NAT gateway IP as the source.

For example, you could try to find the public IP from SSH (Linux app service) with the command.

curl ipinfo.io/ip

enter image description here