Azure Firewall vs Web Application Firewall vs DDoS Protection vs Bastion vs NSG

Verdict: Match the threat to the service: stateful traffic filtering is Azure Firewall, web exploits are Web Application Firewall, traffic floods are DDoS Protection, private admin access to VMs is Bastion, and subnet allow or deny rules are an NSG.

CriterionAzure FirewallWeb Application FirewallDDoS ProtectionAzure BastionNetwork security group
Protects againstEast-west and north-south traffic across workloadsWeb exploits such as SQL injection and cross-site scriptingVolumetric floods that exhaust an applicationExposure of VM management ports to the internetUnwanted inbound or outbound traffic to resources
LayerCloud-native stateful firewall, L3 to L7Application layer, in front of web appsNetwork layer, on a virtual network or public IPConnectivity, RDP and SSH over TLSSubnet or NIC packet filtering by rule
Deployed withCentral service, optionally Firewall ManagerApplication Gateway, Front Door, or CDNA virtual network or an individual public IPThe virtual network, uses private IPsAttached to a subnet or network interface
Choose whenYou need managed, highly available network filteringYou must patch common web exploits centrallyA public endpoint must survive a traffic floodAdmins need VM access with no public IPYou need simple per-property allow or deny

Rules

Traps