Azure Infrastructure Security
DDoS Protection · Azure Firewall · WAF · network segmentation · NSGs · Azure Bastion · Azure Key Vault
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Which service fits which need
| Service | What it does | Think of it as |
|---|---|---|
| Azure DDoS Protection | Protects resources in a virtual network from DDoS attacks at layer 3 and layer 4 | Keeps the app available under a flood |
| Azure Firewall | Fully stateful firewall as a service that inspects east-west and north-south traffic | Central network firewall |
| Azure Web Application Firewall (WAF) | Centralized protection of web applications from common exploits such as SQL injection and cross-site scripting | Layer 7 web app shield |
| Network security group (NSG) | Filters traffic to and from Azure resources in a virtual network with allow and deny rules | Subnet and NIC traffic filter |
| Azure Bastion | RDP and SSH to VMs over TLS from the Azure portal; VMs need no public IP address | Secure admin access |
| Azure Key Vault | Stores and controls access to secrets, keys and certificates | Secret store |
These are separate services with their own use cases. Azure DDoS Protection, Azure Firewall, Azure Web Application Firewall and Azure Bastion are all listed on Learn as part of the Network Security category in Azure.
Azure DDoS Protection
A DDoS attack attempts to exhaust an application's resources, making the application unavailable to legitimate users.
- Protects at layer 3 and layer 4. For layer 7 protection of web applications, add a WAF.
- Designed for services deployed in a virtual network. For other services, the default infrastructure-level DDoS protection applies.
- The default infrastructure protection has a higher threshold than most applications can handle, and it has no telemetry or alerting.
- Always-on traffic monitoring: traffic patterns are monitored 24 hours a day, 7 days a week.
- Adaptive real-time tuning: intelligent traffic profiling learns your application's traffic over time.
- Attack analytics, metrics and alerting. Mitigation flow logs can be streamed to Microsoft Sentinel or another SIEM.
- Simple to enable on a new or existing virtual network; no application or resource changes.
| Tier | Model | Extras |
|---|---|---|
| DDoS Network Protection | Protects resources in a virtual network | Access to the DDoS Rapid Response (DRR) team during an active attack |
| DDoS IP Protection | Pay-per-protected-IP model | Same core engineering features, but without DDoS rapid response support, cost protection and WAF discounts |
Learn lists three common DDoS attack types: volumetric (floods bandwidth), protocol (exploits layer 3 and 4 weaknesses) and resource or application layer (targets web application packets).
Azure Firewall and Web Application Firewall
| Azure Firewall SKU | What stands out |
|---|---|
| Basic | Designed for small and medium-sized businesses (SMBs); recommended for an estimated throughput of 250 Mbps |
| Standard | L3-L7 filtering and threat intelligence feeds directly from Microsoft Cyber Security |
| Premium | Adds signature-based IDPS (intrusion detection and prevention); over 67,000 signatures in more than 50 categories |
- Azure Firewall is fully stateful, with built-in high availability and unlimited cloud scalability.
- It can filter on application-layer protocols such as HTTP/S, so you can control access to fully qualified domain names (FQDNs).
- Threat intelligence can alert on and deny traffic from or to known malicious IP addresses and domains.
- Azure Firewall Manager manages Azure Firewalls across multiple subscriptions and applies firewall policies with a common set of network and application rules.
Web Application Firewall
- Gives centralized protection of web applications from common exploits and vulnerabilities, such as SQL injection and cross-site scripting.
- A known vulnerability can be patched centrally instead of securing each individual web application.
- Deployed with Azure Application Gateway, Azure Application Gateway for Containers, Azure Front Door or Azure Content Delivery Network (CDN). The page notes WAF on Azure CDN is currently in preview.
- Azure WAF protects web applications against application-layer DDoS attacks, such as HTTP floods.
NSG vs Azure Firewall: network security groups provide distributed network layer traffic filtering to limit traffic to resources within virtual networks in each subscription. Azure Firewall is a centralized, fully stateful firewall as a service with network and application-level protection across different subscriptions and virtual networks. Azure Firewall complements NSGs.
Network segmentation and network security groups
Segmentation is about dividing something into smaller pieces. Learn gives three main reasons for network segmentation:
- Group related assets that are part of (or support) workload operations.
- Isolation of resources.
- Governance policies set by the organization.
- If one segment is compromised, you can better contain the impact and prevent it spreading laterally. This supports the Zero Trust assume-breach principle and defense in depth.
- A virtual network (VNet) is the fundamental building block of your private network in Azure. Virtual networks give network-level containment: no traffic is allowed across VNets or inbound to the VNet by default, and communication must be explicitly provisioned.
- You can create multiple virtual networks per region per subscription, and multiple subnets within each virtual network. Subnets divide a virtual network into segments with different security requirements or functions.
- Virtual network peering connects two virtual networks so resources in either can communicate as if in the same network. Traffic uses the Azure backbone network, not the public internet.
- Azure Virtual Network itself is free of charge.
Network security groups (NSGs)
- An NSG filters traffic to and from Azure resources in a virtual network. Rules allow or deny traffic based on source, source port, destination, destination port and protocol.
- One NSG can be associated with each subnet and each network interface. The same NSG can be associated with many subnets and network interfaces.
- Rules are processed in priority order: lower numbers first, priority is a number between 100 and 4096. When traffic matches a rule, processing stops.
- Azure creates three default inbound and three default outbound rules. You can't remove them, but you can override them with rules of higher priority.
- The default inbound rules allow traffic from the virtual network and from the Azure load balancer; all other inbound traffic is denied.
- A source or destination can be an IP address, a CIDR block, a service tag or an application security group (ASG). ASGs group VMs by application structure, such as web, app and database servers.
- NSGs are stateful: a flow record means a response to allowed traffic needs no extra rule.
Azure Bastion and Azure Key Vault
Azure Bastion
- A fully managed PaaS service that provides secure RDP and SSH connectivity to VMs directly over TLS, from the Azure portal or a native client.
- VMs do not need a public IP address, agent or special client software. Connections use TLS on port 443. VMs are protected from port scanning.
- Deployed per virtual network, with support for peering, not per subscription or per VM. Basic, Standard and Premium need a dedicated subnet (AzureBastionSubnet) and a public IP address.
- Without Bastion, you would expose RDP or SSH ports to the internet, which creates a significant surface threat that attackers hunting open management ports can exploit.
| SKU | Notes |
|---|---|
| Developer | Free, shared infrastructure, for development and testing |
| Basic | Dedicated deployment, fixed capacity, production |
| Standard | Adds scalability, native client, shareable links, IP-based connections, custom ports, file transfer |
| Premium | Adds session recording for compliance and private-only deployment |
Azure Key Vault
- Solves three problems: secrets management (tokens, passwords, certificates, API keys), key management (encryption keys) and certificate management (TLS/SSL).
- Apps no longer need to store security information in their code.
- Authentication is done via Microsoft Entra ID. Authorization uses Azure RBAC or a Key Vault access policy.
- Two tiers: Standard (software-based protection, FIPS 140 Level 1) and Premium (HSM-protected keys, FIPS 140-3 Level 3 validated HSMs).
- You can enable logging to monitor how and when keys and secrets are accessed. Microsoft doesn't see or extract your data.
- Used with Azure Disk Encryption, SQL encryption keys and Azure App Service.
Exam Tips
Tick each tip once you can answer it without looking.
“Keep an app available during a network flood (layer 3 and 4 attack)” → Azure DDoS Protection. Trap: A WAF covers layer 7; DDoS Protection works at layers 3 and 4.
“Block SQL injection and cross-site scripting against a web app” → Azure Web Application Firewall (WAF). Trap: An NSG filters by IP address, port and protocol, not by web attack patterns.
“Central, stateful firewall across subscriptions and virtual networks” → Azure Firewall. Trap: NSGs limit traffic within virtual networks; they are not a centralized firewall across subscriptions.
“Admin RDP or SSH to VMs with no public IP and no open management ports” → Azure Bastion (TLS, port 443). Trap: Opening RDP or SSH to the internet exposes the VMs to port scanning.
“Store API keys, passwords, certificates and encryption keys centrally” → Azure Key Vault. Trap: Do not store them in application code.
“Allow or deny traffic to a subnet by source, destination, port and protocol” → Network security group (NSG). Trap: Azure Firewall is the centralized service; an NSG is the per-subnet or per-NIC filter.
“Signature-based intrusion detection and prevention (IDPS)” → Azure Firewall Premium. Trap: Standard has L3-L7 filtering and threat intelligence, not signature-based IDPS.
“Pay per protected public IP for DDoS protection” → DDoS IP Protection. Trap: Rapid response support, cost protection and WAF discounts are not part of IP Protection.
“Get the DDoS Rapid Response (DRR) team during an attack” → DDoS Network Protection. Trap: DDoS IP Protection differs in that it has no DDoS rapid response support.
“Manage many Azure Firewalls and share one set of rules across subscriptions” → Azure Firewall Manager. Trap: Firewall Manager uses firewall policies; an NSG does not manage firewalls.
“Split a virtual network into parts with different security needs” → Subnets. Trap: Peering connects two virtual networks; it does not divide one.
“Default NSG rules are in the way” → Override them with a rule of higher priority (lower number). Trap: You can't remove default rules.
“Two NSG rules both match; which one applies?” → The lower priority number; processing stops at the first match. Trap: A higher number is processed later, so it is not reached.
“How a caller gets access to Key Vault” → Authenticate with Microsoft Entra ID; authorize with Azure RBAC or access policy. Trap: Authentication proves who the caller is; authorization decides what it may do.
“Free Bastion SKU for dev and test” → Developer. Trap: Developer supports one VM at a time and is recommended for development and testing; Premium adds session recording.
“Which Azure services can host a WAF” → Application Gateway, Application Gateway for Containers, Front Door, CDN. Trap: Azure Firewall and NSGs are separate services, not WAF hosts.
Sources
- Azure DDoS Protection overview
- Learn module: Describe Azure DDoS protection
- What is Azure Firewall?
- Learn module: Describe Azure Firewall
- Introduction to Azure Web Application Firewall
- Learn module: Describe Web Application Firewall
- Learn module: Describe network segmentation in Azure
- Azure Virtual Network concepts and best practices
- What is Azure Virtual Network?
- Azure network security groups overview
- Learn module: Describe Azure Network Security Groups
- What is Azure Bastion?
- Learn module: Describe Azure Bastion
- Azure Key Vault overview
- Learn module: Describe Azure Key Vault
Checked against Microsoft Learn on November 13, 2026.