Microsoft AZ-500: Network Security Architecture — Study Guide

Part of the Microsoft Azure Security Engineer Associate AZ-500 — Study Guide. Practice with verified answers in the Microsoft exam hub, or take timed practice tests on ExamRoll.io.

Overview

Azure network security architecture enforces least-privilege connectivity, assumes breach, and instruments continuous monitoring. It combines micro-segmentation inside virtual networks, stateful control planes for east-west and egress traffic, edge protections for internet-facing endpoints, and private access to PaaS. Sound designs prioritize identity-aware access at the application layer while maintaining strong network boundaries, explicit routing, and verifiable telemetry.

Virtual Network Controls and Segmentation

Subnets are the first segmentation boundary. Place workloads with similar trust, lifecycle, and policy in the same subnet; separate tiers (web, app, data) so you can apply independent policies and routes. Avoid flat “shared” subnets that mix admin tools, jump hosts, and business workloads; they complicate policy and increase blast radius.

Network Security Groups (NSGs) apply stateful L3–L4 filtering per subnet or per NIC. Inbound and outbound rules are evaluated by priority (lower number first), with an implicit DenyAll at the end. NSGs are stateful: responses to permitted flows are allowed automatically, so you rarely need ephemeral port rules. Operationally, bind NSGs to subnets for broad controls, then refine on critical NICs. Always document owner, purpose, and expiration for any “temporary” allows.

Application Security Groups (ASGs) let you reference VM groups by name rather than IP, so rules survive scaling and IP churn. Tag VMs into role-based ASGs (e.g., asg-web, asg-app) and express policies like “asg-web → asg-app TCP 443.” This reduces rule sprawl and operational drift.

Effective security rules result from merging NSGs applied to both a NIC and its subnet. The most specific matching allow/deny (by priority) wins. Validate with “Effective security rules” in the portal or via Network Watcher IP flow verify to catch conflicting entries before deployment windows.

Service tags (e.g., AzureLoadBalancer, Storage, Sql, Internet, VirtualNetwork) are maintained by Microsoft and collapse large, dynamic IP spaces into stable rule targets. Prefer service tags to manual IP lists to avoid outages on service IP rotation. For example, restrict egress to Storage and Sql while denying broad Internet.

Micro-segmentation and Zero Trust are realized by:

Example: create an NSG rule allowing web-to-app over TLS with ASGs and deny all else explicitly at a higher priority than the implicit deny to document intent.

az network nsg rule create \
  --resource-group rg-sec \
  --nsg-name nsg-app \
  --name allow-web-to-app-443 \
  --priority 200 \
  --direction Inbound \
  --access Allow \
  --protocol Tcp \
  --source-asgs asg-web \
  --destination-asgs asg-app \
  --destination-port-ranges 443

Network Security Services and Edge Protection

Azure Firewall is a fully stateful, high-availability firewall with central policy. Use it for:

Rule collection groups contain rule collections (Network, Application, NAT) with priorities that define evaluation order. Within a group, lower priority collections are evaluated first; rules are matched by most-specific criteria. Keep DNAT rules in their own group with the highest evaluation priority to capture inbound traffic deterministically.

Threat intelligence-based filtering blocks known bad IPs/domains. Run in Alert during initial baselining, then Deny once false positives are addressed.

Premium features add:

Operationally, isolate the firewall in a dedicated subnet (AzureFirewallSubnet), route all internet-bound traffic to it with UDRs, and enable Availability Zones. Use Firewall Policy (not classic rules) for scalable administration, inheritance, and Dev/Test divergence with a shared base policy.

Web Application Firewall (WAF) mitigates L7 attacks (SQLi, XSS).

Create WAF policies and associate them to gateways, listeners, or routes. Choose Detection mode initially to tune, then Prevention to block. Use managed rule sets (OWASP 3.x) and add custom rules for rate limits or IP ranges. Configure exclusions (e.g., specific JSON fields or headers) to reduce false positives without weakening overall protection.

Distributed Denial of Service (DDoS):

Enable Network Protection on VNets hosting public IPs (Standard SKU). Use telemetry (Metrics, Diagnostic logs) to observe attack vectors, mitigation lifecycle, and effectiveness. Architect protected resources behind load balancers or Application Gateway to absorb volumetric load, and minimize direct public exposure. Combine WAF and DDoS for layered defense.

Private Access, Hybrid Connectivity, and Routing

Private Link and private endpoints provide private IP access from your VNet to PaaS services. A private endpoint is a NIC in your subnet mapped to the PaaS resource; traffic stays on Microsoft’s backbone. Operational steps:

Service endpoints extend your subnet identity to PaaS resources over their public IPs, allowing the PaaS firewall to restrict access to specific subnets. They do not create private IPs, so egress passes the public edge but remains within the Microsoft network. Use service endpoint policies to allow only approved storage accounts. For containerized workloads on IaaS VMs, ensure Azure CNI is used so pod/container IPs are from the subnet; otherwise the service endpoint will not recognize the source and access can fail.

DNS resolution strategy:

Hybrid connectivity:

User-defined routes (UDRs), NVAs, and precedence:

Secure Administration, Monitoring, and Telemetry

Secure administrative connectivity:

Network Watcher provides operational verification and forensics:

Enable NSG flow logs and analytics quickly:

az network watcher flow-log configure \
  --resource-group rg-sec \
  --nsg nsg-app \
  --enabled true \
  --traffic-analytics true \
  --storage-account saflowlogs \
  --workspace /subscriptions/<sub>/resourceGroups/rg-la/providers/Microsoft.OperationalInsights/workspaces/la-workspace

Practical Problem Scenario

Starbucks is modernizing an order management platform to Azure. Security goals: no public IPs on app/data tiers, strict egress, global web protection, and operational visibility.

  1. Create three subnets per region: web, app, data, each with its own NSG and role-aligned ASGs.

Rationale: Subnet-based micro-segmentation with ASGs encodes least-privilege flows (web→app 443, app→data 1433) and reduces blast radius. Separate NSGs per tier avoid accidental policy coupling.

  1. Deploy Azure Front Door Standard/Premium with WAF policy in Prevention mode using OWASP 3.x and custom rules for rate limiting and geo restrictions.

Rationale: Global edge protection absorbs volumetric traffic, blocks common L7 attacks before they reach the region, and reduces latency via anycast. WAF policies at the edge provide consistent enforcement across regions.

  1. Place Application Gateway with WAF v2 in each region in front of the web tier; terminate TLS at App Gateway and re-encrypt to backend.

Rationale: Regional L7 routing and WAF complement Front Door, enabling per-app mTLS to backends, cookie-based affinity, and blue/green deployments while maintaining inspection capability.

  1. Enable DDoS Protection: Network Protection on the VNets containing Application Gateway public IPs.

Rationale: Adaptive per-IP mitigation, telemetry, and cost protection reduce risk from volumetric attacks targeting regional entry points. VNet scoping ensures all current and future public IPs are protected without per-resource configuration.

  1. Deploy Azure Firewall Premium in a secured hub; route all egress from app and data subnets to it with UDRs. Enable TLS inspection and IDPS for outbound traffic, and configure application rules to allow only required FQDNs.

Rationale: Centralized egress control with decryption and signature-based detection prevents command-and-control and data exfiltration. Application rules reduce maintenance versus IP-based rules and align to Zero Trust egress.

  1. Use Private Link for Azure SQL and Storage; disable public network access and configure private DNS zones linked to all VNets. For containerized workloads, use Azure CNI.

Rationale: Private endpoints keep data paths on the backbone and eliminate public exposure. Private DNS ensures seamless name resolution. Azure CNI guarantees pod IPs originate from the subnet so Private Link and service endpoints function correctly.

  1. Establish ExpressRoute with dual circuits in active-active and advertise on-prem routes with BGP; enable IPsec over ER for sensitive traffic. Do not advertise 0/0 initially; pilot forced tunneling in a staging subnet first.

Rationale: ER provides predictable, private connectivity; layered encryption protects high-sensitivity flows. Controlled rollout of forced tunneling prevents accidental internet blackholing and validates exception routes.

  1. Provide administrative access via Azure Bastion and enforce Just-in-Time on all VMs; remove all public IPs from servers.

Rationale: Eliminates exposed management surfaces while preserving auditable, time-bound access aligned with least privilege.

  1. Turn on NSG flow logs and Traffic Analytics, configure Firewall and WAF diagnostics to Log Analytics, and set alerts for DDoS mitigations and WAF blocking surges.

Rationale: Unified telemetry enables proactive detection, capacity planning, and rapid incident response. Alerting on anomaly patterns catches attacks and misconfigurations early.

  1. Implement Azure Policy to deny public IPs on NICs, require NSGs on all subnets, and audit VNets without DDoS enabled; integrate policy checks into CI/CD.

Rationale: Prevents drift, enforces guardrails at scale, and makes secure defaults repeatable for future workloads.


Identity and Access Management · All domains · Compute

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Microsoft →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product