Virtual Network should have DDoS protection enabled
High
Azure
General
vnet-ddos-protection
Applies to
Microsoft.Network/virtualNetworks
What CGPulse checks
A resource passes this rule when ddosProtectionPlan.enabled must equal true. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Enable DDoS protection to defend against volumetric attacks. In Azure Portal: VNet > DDoS protection > associate with a DDoS Protection Plan. See: https://learn.microsoft.com/en-us/azure/ddos-protection/manage-ddos-protection
CLI
az network vnet update --ids "{id}" --ddos-protection-plan "<ddos-plan-id>" --ddos-protection trueBicep
param location string = resourceGroup().location
resource ddosPlan 'Microsoft.Network/ddosProtectionPlans@2023-11-01' = {{
name: '{name}-ddos-plan'
location: location
}}
resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' existing = {{
name: '{name}'
}}
// TODO: Associate the DDoS plan with the VNet by updating the VNet's ddosProtectionPlan propertyTerraform
resource "azurerm_network_ddos_protection_plan" "{name}" {
name = "{name}-ddos-plan"
resource_group_name = "{rg}"
location = var.location
}
resource "azurerm_virtual_network" "{name}" {
name = "{name}"
resource_group_name = "{rg}"
location = var.location
address_space = ["10.0.0.0/16"]
ddos_protection_plan {
id = azurerm_network_ddos_protection_plan.{name}.id
enable = true
}
}
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes