Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Static outbound IP for Azure Web Apps

Is there a 'quick and dirty' way of funnelling calls to a web service via a certain IP address? Possibly in code (C#)?

I'm working on this Azure website (PaaS no VM) that's got it's own domain secured by SSL. e.g. myapp.azurewebsites.net -> https://myapp.com

The system is using a 3rd party web service that uses whitelisted IPs for access control. Unfortunately they are not happy whitelisting the standard Azure egress IPs.

So what I need to do is find a way to call that web service via our own IP address (the one that came with the domain name package). If possible, only that traffic, not all outgoing.

I've come across several solutions but I’d rather not want to compromise the stability of the production website by experimenting with App Service Environment.

like image 554
The genuine geek Avatar asked Nov 18 '15 10:11

The genuine geek


1 Answers

I think the scenario being asked about is outbound calls from an app running on Azure App Service (aka Azure Websites), to an external endpoint.

In that scenario, the outbound calls from the web app are NAT'd using a pool of IP addresses allocated for the App Service scale unit that is running your app.

Using the "preview" portal (portal.azure.com), drill into the website blade for your app and click through "All settings" --> "Properties". In the properties blade that appears, there is a textbox called "OUTBOUND IP ADDRESSES". Those are the values you need to give to the third party provider to whitelist.

like image 152
Stefan Avatar answered Sep 19 '22 16:09

Stefan