azureazure-web-app-serviceip-restrictions

Azure AppService IP address restrictions


I really have a simple question (well, I think that this is a simple question though). I'm trying to limit access just to one single IP address. If I'm inspecting the IP address, the IP address has a x.x.x.x/20 prefix. Most of the examples on the internet shows me to use /32 instead. I've tried IP address with 20 as well as 32 prefixes. However, without any successful attempts I'm not able to access my AppService through my frontend application. In fact, I even tried to give access in the AppService to my location machine without making requests through my frontend app, even then it won't allow me to access my AppService?

First of all, I navigate to my AppService that is running on Azure, whereafter having clicked on the AppService I choose for 'Networking'. On this page, I'm able to click on 'Access restriction' where I can limit IP ranges/addresses.

Inbound Traffic

Here is an example of how I'm trying to accomplish this:

Access Restrictions

Hopefully I was able to provide enough information for you. Any thoughts why this would not work?


Solution

  • I have configured the Single IP Address to my Azure app service which works successfully fine:

    enter image description here

    External IP addresses which are not specified in the access restrictions will not work to route my azure app service:

    enter image description here

    If there are any front-end files, that filenames should be added in the default documents sections which is in Azure Portal > App Service > Configuration > Default Documents:

    enter image description here

    Refer to this MS Doc for more information on default web page defining of an Azure App Service and mapping the URL path to a directory.