Restrict IPs from accessing azure static web app using FrontDoor

kdeman 11 Reputation points
2021-06-02T20:31:18.167+00:00

Is it possible to restrict access to a azure static web app leveraging FrontDoor + WAF? We are developing our static web app at the moment and don't want just anyone to access our static web app just yet. So was thinking if FrontDoor + WAF could help to restrict access via IP selection...is this possible?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
692 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
967 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,581 Reputation points Microsoft Employee
    2021-06-03T05:54:38.917+00:00

    Hello @kdeman ,

    It is possible to restrict IPs from accessing your Azure static web app using Web Application Firewall for Azure Front Door. An IP address–based access control rule is a custom WAF rule that lets you control access to your web applications. It does this by specifying a list of IP addresses or IP address ranges in Classless Inter-Domain Routing (CIDR) format.

    By default, your web application is accessible from the Internet. If you want to limit access to clients from a list of known IP addresses or IP address ranges, you may create an IP matching rule that contains the list of IP addresses as matching values and sets operator to "Not" (negate is true) and the action to Block. After an IP restriction rule is applied, requests that originate from addresses outside this allowed list receive a 403 Forbidden response.

    Please refer : https://learn.microsoft.com/en-us/azure/web-application-firewall/afds/waf-front-door-configure-ip-restriction

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

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


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.