Microsoft security
Azure network defenses
Choose between segmentation, NSGs, Firewall, DDoS Protection, and WAF.
Begin with the type of traffic
A network carries packets between systems. An IP address identifies an endpoint; a port helps identify a service, such as HTTPS. A web request also has application-level content: a URL, headers, and possibly form data. Different controls inspect different aspects of that traffic.
Divide the environment
An Azure virtual network (VNet) provides a private networking environment. Subnets divide its address space. Segmentation separates workloads so a problem in one area does not automatically expose everything else.
Creating two subnets is not, by itself, a rule that blocks communication. Enforce the intended boundaries with network rules, routing, and other controls.
Pick the control for the problem
| Capability | Main job | Example |
|---|---|---|
| Network security group (NSG) | Allow or deny network flows using addresses, ports, protocol, and direction | Allow the app subnet to contact a database port |
| Azure Firewall | Centrally inspect and control network traffic using managed firewall capabilities | Govern outbound destinations across workloads |
| Azure DDoS Protection | Mitigate network-layer denial-of-service floods | Keep a public service reachable during a traffic attack |
| Web Application Firewall (WAF) | Inspect web requests for common application attacks | Detect a SQL-injection pattern in an HTTP request |
An NSG is stateful and can be associated with a subnet or network interface. Its rules are not a replacement for a WAF’s understanding of web requests. Azure Firewall has capabilities that vary by tier; recognize its role without assuming every advanced feature exists in every tier.
A concrete example
A school runs a public lesson app and a private database. A WAF checks malicious web requests. DDoS protection addresses supported network traffic floods. Subnets and NSG rules restrict paths to the database. A central firewall can govern other network traffic. This is an illustrative set of complementary controls, not a claim that every packet passes through a fixed sequence of products.
Check your understanding
1. A question describes SQL injection in a web request. Which control is the best match: WAF or NSG?
Show explanation
WAF. An NSG can allow HTTPS traffic but does not decide whether the HTTP request contains a SQL-injection payload.
2. Two resources are placed in different subnets. Is communication automatically prohibited?
Show explanation
No. Segmentation creates structure; rules and routing must enforce the intended isolation. Check the configured network controls.
Sources
- Microsoft: Azure Virtual Network
- Microsoft: network security groups
- Microsoft: Azure Firewall
- Microsoft: DDoS Protection
- Microsoft: Web Application Firewall
Sources consulted November 28, 2026. Examples and questions are original study exercises.