Azure Web App IP

Ping S 40 Reputation points
2023-08-18T22:09:58.1133333+00:00

I am setting up firewall rules for mysql server with public access. I am wondering whether my azure web app has a fixed IP address. I don't really really want to activate ALL azure web apps to be able to connect to mysql server. Thank you.

Azure Web Application Firewall
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 27,366 Reputation points Microsoft Employee
    2023-08-19T01:08:25.4666667+00:00

    @Ping S

    Thank you for reaching out.

    You can go through this documentation to find the inbound & outbound IPs of the App service.

    Regardless of the number of scaled-out instances, each app has a set number of outbound IP addresses at any given time. Any outbound connection from the App Service app, such as to a back-end database, uses one of the outbound IP addresses as the origin IP address. The IP address to use is selected randomly at runtime, so your back-end service must open its firewall to all the outbound IP addresses for your app.

    The set of outbound IP addresses for your app changes when you perform one of the following actions:

    • Delete an app and recreate it in a different resource group (deployment unit may change).
    • Delete the last app in a resource group and region combination and recreate it (deployment unit may change).
    • Scale your app between the lower tiers (Basic, Standard, and Premium), the PremiumV2 tier, the PremiumV3 tier, and the Pmv3 options within the PremiumV3 tier (IP addresses may be added to or subtracted from the set).

    You can find the set of all possible outbound IP addresses your app can use, regardless of pricing tiers, by looking for the possibleOutboundIpAddresses property or in the Additional Outbound IP Addresses field in the Properties blade in the Azure portal. See Find outbound IPs.

    You can also go through this section to Get a static outbound IP for your web app.

    If it helps you can also take a look at this tutorial on how to lock down the outbound traffic from your App Service app to back-end Azure resources or other network resources with Azure Firewall.

    Hope this helps! Please let us know if you have any additional questions.


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.