Protect your public load balancer with Azure DDoS Protection
Ankit Ranjan (DevOps Engineer)
Actively Seeking Azure DevOps/Cloud Role | DevOps Engineer | Automating & Reducing Developer Toil | Modernising IAC like Jam on the Bread | Microsoft Certified: Azure Admin Associate | Certified Terraform Associate |
Azure DDoS Protection provides advanced mitigation features like adaptive tuning, attack alert notifications, and monitoring to safeguard public load balancers against large-scale DDoS attacks. In this tutorial, you will learn how to:
Create a DDoS Protection Plan
Create the Virtual Network
You'll set up a virtual network, a subnet, and an Azure Bastion host, and associate it with a DDoS Protection plan. The virtual network and subnet will host the load balancer and virtual machines. The Bastion host will securely manage the virtual machines and allow the installation of IIS to test the load balancer. The DDoS Protection plan will protect all public IP resources within the virtual network.
Click Save or Add to confirm.
Create a Zone-Redundant Load Balancer
You'll set up a zone-redundant load balancer to distribute traffic across virtual machines. Zone redundancy ensures that the load balancer remains operational even if one or more availability zones in the region fail, as long as at least one zone is healthy.
During the setup, you will configure the following:
Steps to Create the Load Balancer
Create a NAT Gateway
In this section, you'll set up a NAT gateway to provide outbound internet access for resources in your virtual network. For additional options regarding outbound rules, refer to Network Address Translation (SNAT) for outbound connections.
Steps to Create a NAT Gateway
Create Virtual Machines
In this section, you will create two virtual machines (VMs), myVM1 and myVM2, each deployed in a different availability zone (Zone 1 and Zone 2). These VMs will be added to the backend pool of the load balancer you created earlier.
Steps to Create the Virtual Machines
Once both VMs are created, they will be ready to function as part of the backend pool for the load balancer.
Install IIS
# Install IIS
Install-WindowsFeature -name Web-Server -IncludeManagementTools?
# Remove default iisstart.htm
Remove-Item -Path C:\inetpub\wwwroot\iisstart.htm?
# Create a new iisstart.htm
Add-Content -Path "C:\inetpub\wwwroot\iisstart.htm" -Value "Welcome to myVM1"
Repeat these steps for myVM2, updating the last command to reflect the name of the second VM.
领英推荐
Test the Load Balancer
Azure DDoS Protection Features: Always-On Traffic Monitoring
Azure DDoS Protection continuously monitors incoming traffic and compares it against the thresholds defined in the DDoS policy. If the traffic exceeds these thresholds, DDoS mitigation is triggered automatically.
Once the traffic volume drops below the defined thresholds, mitigation is stopped. During the mitigation process, the following checks are performed on the traffic sent to the protected resource:
Adaptive Real-Time Tuning
To address the complexity of attacks, such as multi-vector DDoS attacks, and the unique behaviors of tenant applications, Azure DDoS Protection offers tailored, per-customer protection policies. This is achieved through two key features:
?Azure DDoS Protection Mitigation Policies
?Metric for an IP address under a DDoS attack
If the public IP address is under attack, the value for the metric Under DDoS attack or not changes to 1 as DDoS Protection performs mitigation on the attack traffic.
DDoS Network Protection Virtual Machine Architecture
DDoS Network Protection is activated on the virtual network associated with the Azure (internet) load balancer, which has a public IP linked to it
DDoS IP Protection Virtual Machine Architecture
DDoS IP Protection is enabled on the frontend public IP address of a public load balancer.
DDoS Network Protection Windows N-Tier Architecture
DDoS Network Protection is enabled on the virtual network, providing DDoS protection for all public IPs at Layers 3 and 4. For Layer 7 protection, deploy the Application Gateway with the WAF SKU.
?Types of Attacks Mitigated by Azure DDoS Protection
Azure DDoS Protection can mitigate the following types of attacks:
Inline DDoS Protection with Gateway Load Balancer and Partner NVAs
DDoS attacks on latency-sensitive workloads, such as gaming, can cause disruptions lasting 2-10 seconds. Gateway Load Balancer protects these workloads by injecting relevant NVAs into the ingress path of internet traffic. Once connected to a Standard Public Load Balancer frontend or virtual machine IP configuration, no additional setup is required to ensure traffic flows to and from the application endpoint through the Gateway Load Balancer.
Inbound traffic is inspected by the NVAs, and clean traffic is routed back to the backend infrastructure (e.g., gaming servers). Traffic flows from the consumer virtual network to the provider virtual network and back, with the option for the networks to be in different subscriptions, tenants, or regions, offering greater flexibility and ease of management.
?Enabling Azure DDoS Protection on the VNet of a Standard Public Load Balancer frontend or the virtual machine VNet protects against L3/4 DDoS attacks.
Azure DDoS Protection on the game servers' Load Balancer safeguards against L3/4 DDoS attacks, with protection policies automatically tuned based on the game server's traffic profile and application scale.
Introducing to Azure DDoS Protection
Enabling Azure DDoS Protection on the VNet of a Standard Public Load Balancer frontend or the virtual machine VNet protects against L3/4 DDoS attacks.
Azure DDoS Protection on the game servers' Load Balancer safeguards against L3/4 DDoS attacks, with protection policies automatically tuned based on the game server's traffic profile and application scale.
Attack Analytics, Telemetry, Monitoring, and Alerting
Azure DDoS Protection automatically identifies and mitigates DDoS attacks with no user intervention.
If the protected resource is under a subscription with Microsoft Defender for Cloud, DDoS Protection sends an alert to Defender for Cloud whenever an attack is detected and mitigated.
Alternatively, you can configure alerts for active mitigations on a protected public IP by using the "Under DDoS attack or not" metric. Additionally, you can set up alerts for other DDoS metrics and access attack telemetry to analyze attack scale, dropped traffic, attack vectors, top contributors, and more.
Engage DRR During an Active Attack
To engage DRR during an active attack, follow these steps in the Azure portal:
?
?