Loading...

Detect traffic anomalies and auto-mitigate spikes with Azure WAF on Microsoft Azure Front Door

Detect traffic anomalies and auto-mitigate spikes with Azure WAF on Microsoft Azure Front Door

Introduction

Azure WAF on Microsoft Azure Front Door provides a centralized protection solution for your web applications. WAF includes built-in rules to defend against common exploits and vulnerabilities, and custom rules so you can tailor the protection to your specific needs.

Challenge
A popular use-case for custom rules is to rate limit Front Door traffic based on the Country or IP address range. However, configuring the rate limit threshold can sometimes be tricky due to varying traffic patterns based on the time of the day or the day of the week. For example, a rate limit rule created to protect against traffic spikes on a weekend (when the traffic volume is lower) may not fire on a weekday because what's a spike on a weekend might be the usual traffic volume for a weekday.

 

Solution

It involves two main steps:

  1. Detect anomalous spikes in traffic
  2. Automatically add Azure WAF rules to filter out the traffic causing the spike

 

In the deep-dive video that follows, we do a step-by-step walkthrough of how to perform these steps. The video is structured as follows:

 

- Introduction

  • What anomaly detection is.
  • What anomaly detection tools are available in Azure.

- Defining the problem statement

  • An overview of the challenge and issue we are trying to solve.

- Exploring the architecture diagram

  • An overview of the various components of the system and how they come together to solve the problem.

- Seeing it in action

  • Setup:
    1. Create a WAF policy
    2. Create a Microsoft Azure Front Door
    3. Link it to the WAF policy we created in Step (1)
    4. Define a dynamic threshold alert on the Azure Front Door endpoint
    5. Create an Azure Function that would run when the alert fires
  • Demo:
    • Simulate a DDOS (distributed denial of service) attack
    • Demonstrate that the attack has started
    • Wait for the alert to fire
    • Demonstrate that Azure WAF rules to mitigate the attack get auto-generated
    • Demonstrate the attack is mitigated after the Azure WAF rules are deployed to the edge

 

You can find the reference code here.

 

 

 

 

Published on:

Learn more
Azure Network Security Blog articles
Azure Network Security Blog articles

Azure Network Security Blog articles

Share post:

Related posts

Announcing latest Azure Cosmos DB Python SDK: Powering the Future of AI with OpenAI

We’re thrilled to announce the stable release of Azure Cosmos DB Python SDK version 4.14.0! This release brings together months of innov...

8 hours ago

How Azure CLI handles your tokens and what you might be ignoring

Running az login feels like magic. A browser pops up, you pick an account, and from then on, everything just works. No more passwords, no more...

1 day ago

Boost your Azure Cosmos DB Efficiency with Azure Advisor Insights

Azure Cosmos DB is Microsoft’s globally distributed, multi-model database service, trusted for mission-critical workloads that demand high ava...

3 days ago

Microsoft Azure Fundamentals #5: Complex Error Handling Patterns for High-Volume Microsoft Dataverse Integrations in Azure

🚀 1. Problem Context When integrating Microsoft Dataverse with Azure services (e.g., Azure Service Bus, Azure Functions, Logic Apps, Azure SQ...

3 days ago

Using the Secret Management PowerShell Module with Azure Key Vault and Azure Automation

Automation account credential resources are the easiest way to manage credentials for Azure Automation runbooks. The Secret Management module ...

4 days ago

Microsoft Azure Fundamentals #4: Azure Service Bus Topics and Subscriptions for multi-system CRM workflows in Microsoft Dataverse / Dynamics 365

🚀 1. Scenario Overview In modern enterprise environments, a single business event in Microsoft Dataverse (CRM) can trigger workflows across m...

4 days ago

Easily connect AI workloads to Azure Blob Storage with adlfs

Microsoft works with the fsspec open-source community to enhance adlfs. This update delivers faster file operations and improved reliability f...

5 days ago

Microsoft Azure Fundamentals #3: Maximizing Event-Driven Architecture in Microsoft Power Platform

🧩 1. Overview Event-driven architecture (EDA) transforms how systems communicate.Instead of traditional request–response or batch integration...

5 days ago

Azure Developer CLI (azd) – October 2025

This post announces the October release of the Azure Developer CLI (`azd`). The post Azure Developer CLI (azd) – October 2025 appeared f...

5 days ago

Microsoft Azure Fundamentals #2: Designing Real-Time Bi-Directional Sync Between Dataverse and Azure SQL for Multi-Region Deployments

Here’s a detailed technical breakdown of designing a real-time bi-directional sync between Dataverse and Azure SQL for multi-region deployment...

6 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy