Adding firewall in front of web apps in Hub-and-Spoke architecture

Najam ul Saqib 360 Reputation points
2025-01-29T15:55:53.49+00:00

Hi,

I am shifting towards hub & spoke model in my Azure subscription so that all the traffic coming into my subscription goes through the firewall.

I have multiple types of resources but I am more concerned about web apps and function apps. How can they be connected to the firewall and still be reached using their DNS name?

Is this a possibility to attach WAF policy with Azure Firewall or do I need Azure Frontdoor separately in the hub to be able to use WAF?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
779 questions
Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
731 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,663 questions
Azure Web Application Firewall
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,443 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Praveen Bandaru 850 Reputation points Microsoft External Staff
    2025-02-06T11:10:00.3266667+00:00

    Hello Najam ul Saqib

    Greetings!

    Thank you for your response.

    Azure Front Door serves as a global load balancer and does not have regional configurations or integrate with virtual networks, unlike Application Gateway.

    To use Front Door, you can maintain the hub resource group and place the function app in spoke resource groups. Additionally, you can implement access restrictions on the function app to permit only Front Door traffic.

    Q. In my model, all of the web apps traffic will go through FrontDoor WAF and rest of the traffic will be via Firewall. Is that okay?

    Solution: Yes, your observation is correct. You can achieve this by using the scenario mentioned above.

    If you need to connect to the client Functions App via Azure Firewall, you must create a DNAT rule pointing to the FQDN of the Function App. The challenging aspect is that the client must direct the FQDN of the Function App to the Azure Firewall's IP. For a global scale implementation, you will need to create a custom domain and point the Azure Firewall IP to it.


    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.


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.