Azure Landing Zone Hour 4: Network Topology and Connectivity
- Choose with evidence, based on scale, team skills and routing complexity, between a traditional hub-spoke (a customer-managed hub VNet) and Virtual WAN (a Microsoft-managed hub with routing intent), and explain the limitations of each.
- Build a non-overlapping IP address plan for multiple regions and multiple Landing Zones, and use the IPAM pools, network groups, connectivity configurations and security admin rules of Azure Virtual Network Manager (AVNM) to put that plan into practice on the platform.
- Design the hub: Azure Firewall (differences between Basic, Standard and Premium), UDRs and BGP route propagation, forced tunneling, and explicit outbound access (the change in default outbound access). Be able to read effective routes.
- Design hybrid connectivity: VPN Gateway (AZ SKUs, active-active, BGP) and ExpressRoute (circuits, gateway SKUs, FastPath, Global Reach), and understand the gateway SKU retirement timeline for 2025–2026.
- Make Private Link a platform capability: keep private DNS zones centralized in the connectivity subscription, use the DNS Private Resolver for hybrid resolution, and have ALZ, on the
corpmanagement group, use Deploy-Private-DNS-Zones (DINE) to register DNS records for private endpoints automatically. - Combine DDoS Protection, WAF, Application Gateway and Front Door for internet-facing workloads, and understand how
corpandonlineLanding Zones differ in network policy. - Troubleshoot connectivity in the order "routing → filtering → DNS", using Network Watcher, effective routes / effective NSGs,
nslookupand similar tools.
1-hour timetable
| # | Time | Module | Core content | Animation / interaction | Lab (sandbox tenant) |
|---|---|---|---|---|---|
| 0 | Before class | Setup: Connect Subscriptions and Plan Addressing | Subscription mapping, variables, resource providers, cost budget, single-subscription fallback | Addressing plan self-check list | Create resource groups such as rg-alz-conn-cc |
| 1 | 00–06 | Network Topology Selection | Hub-spoke vs. Virtual WAN comparison, routing intent, spoke-to-spoke traffic, when to migrate | Topology selection decision tool | Build hub and spoke VNets and peer them |
| 2 | 06–13 | IP Planning and AVNM | Address layering, subnet sizes, reserved addresses, AVNM network groups, IPAM pools, connectivity / security admin / routing configurations | IPAM allocation simulator | AVNM + IPAM pools allocate addresses to spokes |
| 3 | 13–21 | Hub Design: Firewall, UDRs and Forced Tunneling | Firewall SKUs, policy hierarchy, UDRs and route selection order, forced tunneling, default outbound access | Core animation: three packet paths from a spoke VM | Firewall Basic + UDR (or skip) |
| 4 | 21–28 | Hybrid Connectivity: VPN and ExpressRoute | S2S / P2S, AZ SKUs, BGP, ExpressRoute circuits and gateways, FastPath, SKU retirement | Gateway SKU selection and retirement timeline | VPN gateway (optional, delete right after use) |
| 5 | 28–35 | Private Link and Private DNS | Private endpoints, privatelink zones, DNS Private Resolver, Deploy-Private-DNS-Zones (DINE) | DNS resolution chain animation | Storage account private endpoint + automatic registration |
| 6 | 35–42 | Inbound Access and Protection | Two DDoS tiers, WAF, Application Gateway v2, Front Door Premium, combined patterns | Inbound path builder | WAF policy (create the policy only, no gateway) |
| 7 | 42–50 | Network Policy for corp and online | Five corp assignments, landingzones network policy, online differences, exemptions and DoNotEnforce | Policy evaluator | Trigger Deny under corp and review compliance |
| 8 | 50–60 | Network Review and Troubleshooting | Review checklist, Network Watcher, effective routes, DNS troubleshooting, interactive troubleshooting tree | Troubleshooting decision tree | End-to-end connectivity check |
| — | After class | Cheat sheet · Capstone lab | Build a "private, auditable, resolvable" corp network for myapp | Final quiz (12 questions) | Capstone lab |
Knowledge Coverage Matrix
| Target skill | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | Key commands / resources | Lab |
|---|---|---|---|---|---|---|---|---|---|---|
| Choose a network topology (hub-spoke / vWAN) | ✓ | ✓ | ✓ | ✓ | · | · | · | ✓ | az network vnet peering, az network vhub | hub + spoke |
| IP address planning and IPAM | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | az network manager ipam-pool | IPAM pool |
| Azure Firewall and UDRs | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | ✓ | az network firewall, route-table | Firewall Basic |
| VPN / ExpressRoute | ✓ | ✓ | · | ✓ | ✓ | · | ✓ | ✓ | az network vnet-gateway | VPN gateway (optional) |
| Private Link and Private DNS | · | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | az network private-dns, private-endpoint | Storage private endpoint |
| DNS Private Resolver | · | ✓ | · | ✓ | ✓ | · | · | ✓ | az dns-resolver | Inbound / outbound endpoints |
| DDoS / WAF / App Gateway / Front Door | · | · | ✓ | · | · | ✓ | ✓ | ✓ | az network ddos-protection, az afd | WAF policy |
| ALZ network policy (corp / landingzones) | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | az policy assignment list | Trigger Deny |
| Connectivity and DNS troubleshooting | · | · | ✓ | ✓ | ✓ | · | ✓ | ✓ | az network watcher, nslookup | Troubleshooting tree |
What this hour leaves out (and where to learn it)
| Topic | Why it is not in this hour | Where to learn it |
|---|---|---|
| Management group hierarchy, ALZ default policy assignment list | Covered in hour 1; this hour uses only the network-related parts | Hour 1 |
| Azure Policy effect evaluation order, remediation tasks, exemptions | Covered in hour 2; this hour uses it directly | Hour 2 |
| RBAC roles for the network team (such as the ALZ custom roles Network-Management and Network-Subnet-Contributor) and PIM | Belongs to identity design | Hour 3 |
| NSG flow logs / VNet flow logs, Traffic Analytics, Firewall logs into Log Analytics | Belongs to management and monitoring | Hour 5: Management and Monitoring |
Deploy connectivity with the IaC Accelerator (avm-ptn-alz-connectivity-* modules) | Belongs to automation | Hour 6: Automation · Terraform course |
| AKS CNI, the userDefinedRouting outbound type, Application Gateway for Containers | Networking inside workloads | AKS in 8 hours |
| BGP protocol details, NVA vendor configuration, SD-WAN integration | Beyond 1 hour | CAF: Define an Azure network topology |
How to use this course material
Principles · diagrams · animation · commands · lab · production case · troubleshooting · quiz · voice · video. Read "Principles" and "Animation" first, then do the "Lab". The packet-path animation in Module 3 is the core of this hour.
A module counts toward progress when you score ≥ 70% on the quiz or click "Mark this module complete". Progress is saved in localStorage in this browser (it is cleared on refresh if local storage is disabled).
The "Voice" tab reads the narration aloud using the browser's built-in Web Speech API (en-US). If no English voice pack is installed, the narration script can still be read, or passed to a TTS tool.
platform/alz/2026.11.0 as of 2026-11-18. Management group IDs use the ALZ defaults (alz → platform → connectivity …; alz → landingzones → corp / online / local), consistent with hour 1. None of the cloud commands were run in a real tenant; the output shown is sample output.Module 0 · Setup: Connect Subscriptions and Plan Addressing (complete before class)
- A dedicated sandbox Entra tenant with the ALZ default management group hierarchy already deployed (or built by hand):
alz,platform,connectivity,landingzones,corp,online, and so on (hour 1). - Ideal subscriptions:
sub-alz-connectivity(under theconnectivitymanagement group) andsub-lz-corp-myapp(under thecorpmanagement group).sub-alz-managementandsub-alz-identityare not used in this hour. - Permissions: Owner on the connectivity subscription and the application subscription (or Network Contributor + User Access Administrator), plus read access on the
alzmanagement group to review policy assignments. - Local machine: Azure CLI 2.70 or later (the commands prompt you to install the extensions
azure-firewall,virtual-network-manageranddns-resolver), plus Bash or PowerShell 7.
Connection to earlier hours
| From | Reused in this hour | What to do if you do not have it |
|---|---|---|
| Hour 1 | Management group hierarchy and default policy assignments; Enable-DDoS-VNET on connectivity, and the 5 network-related assignments on corp | Create only the six management groups alz, platform, connectivity, landingzones, corp and online by hand; for the policy demonstration in Module 7, use "DoNotEnforce + compliance scan" instead |
| Hour 2 | Policy remediation task approach (az policy remediation create) | The command cheat sheet in Module 5 gives the full command |
| Hour 3 | Role assignment for the network administrator (Network Contributor scoped to the connectivity subscription) | Use the subscription Owner role directly for the lab |
Step 1: set shared variables
# Subscriptions (replace with your subscription IDs) SUB_CONN=<connectivity-subscription-id> SUB_APP=<corp-landing-zone-subscription-id> LOC=canadacentral LOC2=canadaeast # Resource group and resource names (CAF abbreviation + workload + region abbreviation cc) RG_CONN=rg-alz-conn-cc RG_DNS=rg-alz-dns-cc RG_APP=rg-lz-myapp-cc HUB=vnet-hub-cc # 10.0.0.0/16 SPOKE=vnet-spoke-myapp-cc # 10.1.0.0/16 FW=afw-hub-cc TAGS="env=lab owner=platform-team costCenter=cc-1000 workload=alz-network"
Step 2: create resource groups and register resource providers
az account set -s $SUB_CONN az group create -n $RG_CONN -l $LOC --tags $TAGS az group create -n $RG_DNS -l $LOC --tags $TAGS az provider register -n Microsoft.Network --wait az account set -s $SUB_APP az group create -n $RG_APP -l $LOC --tags $TAGS az provider register -n Microsoft.Network --wait
{
"id": "/subscriptions/<connectivity-subscription-id>/resourceGroups/rg-alz-conn-cc",
"location": "canadacentral",
"name": "rg-alz-conn-cc",
"properties": { "provisioningState": "Succeeded" },
"tags": { "costCenter": "cc-1000", "env": "lab", "owner": "platform-team", "workload": "alz-network" }
}
Step 3: write the addressing plan on paper first
| Scope | CIDR | Description |
|---|---|---|
| Azure overall pool | 10.0.0.0/11 | Reserved for Azure; must not overlap with on-premises 192.168.0.0/16 or 172.16.0.0/12 |
| canadacentral regional pool | 10.0.0.0/12 | Hub and all spokes in this region |
| canadaeast regional pool | 10.16.0.0/12 | Disaster recovery region; not used for now |
vnet-hub-cc | 10.0.0.0/16 | AzureFirewallSubnet 10.0.0.0/26, AzureFirewallManagementSubnet 10.0.0.64/26, GatewaySubnet 10.0.1.0/27, AzureBastionSubnet 10.0.1.64/26, snet-dnspr-in 10.0.2.0/28, snet-dnspr-out 10.0.2.16/28 |
vnet-spoke-myapp-cc | 10.1.0.0/16 | snet-app 10.1.1.0/24, snet-pe 10.1.2.0/24 |
| Simulated on-premises (used only for the routing and DNS demonstrations) | 192.168.0.0/16 | Example on-premises DNS server 192.168.10.4 |
rg-alz-conn-cc, rg-alz-dns-cc and rg-lz-myapp-cc all in the same subscription, and place that subscription under the corp management group. This lets you demonstrate the networking itself and the policy effects on corp, but note: the Deny-HybridNetworking policy on corp will block creating VPN / ExpressRoute gateways and Virtual WAN in this subscription. For the optional Module 4 lab, first move the subscription temporarily to the connectivity management group (or sandbox), and move it back when finished.Cost budget (estimate if all labs are completed)
| Resource | Billing method | Usage in this hour | Estimate |
|---|---|---|---|
| VNets, peerings, route tables, NSGs, private DNS zones | Peering is billed by traffic; private DNS zones by zone count and query count | A few hours | < US$1 |
| Azure Firewall Basic | Billed per deployed hour + GB processed | About 1–2 hours | About US$1 |
| Test VM (B1s / B2ats_v2, no public IP) | Hourly | About 2 hours | < US$0.1 |
| Bastion Developer | Free tier (available in some regions) | Connectivity test VM | 0 |
| VPN gateway VpnGw1AZ (optional) | Hourly + outbound data transfer | About 1 hour (including 30–45 minutes to create) | Less than US$1 |
| DNS Private Resolver (optional) | Billed per endpoint-hour | About 1 hour | Less than US$1 |
Self-check list
az account management-group subscription show-sub-under-mg --name corp -o table az account management-group subscription show-sub-under-mg --name connectivity -o table
Module 1 · Network Topology Selection: Hub-Spoke vs. Virtual WAN
- Explain the components, routing model and operational responsibility of a traditional hub-spoke (a customer-managed hub VNet with VNet peering) and of Virtual WAN (a Microsoft-managed virtual hub).
- Understand the consequence of VNet peering being non-transitive, and the three ways spokes can reach each other: forwarding through the hub firewall, AVNM direct connectivity groups, and vWAN hub routing.
- Know what Virtual WAN routing intent (Internet and Private routing policies) does, what it requires, and that it is mutually exclusive with custom route tables.
- Choose between the two topologies by answering a set of questions (scale, number of branches, NVA needs, DNS design, team skills).
connectivity management group from hour 1. Importance: ★★★★★ (once the topology is set, migrating is expensive)What: what the two topologies are
Traditional hub-spoke: in the connectivity subscription, create a hub VNet (such as vnet-hub-cc) containing Azure Firewall or a third-party NVA, VPN / ExpressRoute gateways, Bastion and DNS Private Resolver. Each Landing Zone has its own spoke VNet, connected to the hub through VNet peering. The spoke subnets carry a UDR that points 0.0.0.0/0 and traffic to other spokes at the private IP of the hub firewall. You maintain all routes yourself.
Virtual WAN (vWAN): a managed network service run by Microsoft. Each region has one virtual hub (it takes up its own address prefix, ideally a /23), which contains a managed hub router. You can optionally add S2S / P2S VPN gateways, ExpressRoute gateways, Azure Firewall (called a secured virtual hub), supported NVAs or SaaS security offerings. Spoke VNets connect to the hub through "virtual network connections". Hubs are fully meshed automatically, and routes propagate automatically through BGP.
| Dimension | Traditional hub-spoke | Virtual WAN |
|---|---|---|
| What the hub is | Your own VNet; you can put any resource in it | A Microsoft-managed virtual hub; it can only host supported gateways, firewalls and NVAs |
| Spoke-to-spoke connectivity | Peering is not transitive, so you need a UDR pointing to the hub firewall, or AVNM direct connectivity groups | Reachable by default (within a hub and across hubs); traffic is inspected by the firewall once routing intent is enabled |
| Route maintenance | Manual UDRs + BGP propagation from the gateways | Hub route tables, associations and propagation; routing intent simplifies this to two policies |
| Branch-to-branch | Must be built yourself (Route Server + NVA, etc.) | The Standard type natively supports transit between VPN, ExpressRoute and P2S |
| Private DNS zone links | Can link directly to the hub VNet; DNS Private Resolver goes in the hub | Private DNS zones cannot be linked to the virtual hub; you need a "shared services" spoke that hosts the Resolver |
| Flexibility | Highest: any NVA, Route Server, custom routing | Lower: limited by virtual hub capabilities |
| Operational overhead | High: routing, gateways and firewalls must all be designed by you | Low: especially noticeable with multiple regions and branches |
| ALZ support | The "hub and spoke virtual network" option in the IaC Accelerator | The "Virtual WAN" option in the IaC Accelerator |
Why: why ALZ centralizes networking in the connectivity subscription
- Single egress point: all traffic to the internet and on-premises goes through the same set of firewalls, which makes auditing and threat-intelligence filtering easier.
- Separation of duties: the platform networking team owns the hub, while application teams own only the subnets within their own spokes (together with the Network-Subnet-Contributor role from hour 3).
- Share expensive resources: ExpressRoute gateways, firewalls and DDoS plans are deployed only once.
- Enforceable policy: the Deny-HybridNetworking policy on
corpprevents application subscriptions from building their own VPN / ExpressRoute / vWAN, forcing all hybrid connectivity through the platform.
How: routing intent
On a secured virtual hub you can configure two routing policies, each of which can have only one next hop (Azure Firewall, an NVA or a SaaS offering in the hub):
- Internet traffic policy: the hub advertises
0.0.0.0/0to all VNet connections, VPN and ExpressRoute, so internet traffic goes through the firewall. The default route is not propagated across hubs; each hub uses its local security appliance for internet egress. - Private traffic policy: traffic between VNets, between VNets and branches, between branches, and between hubs all goes through the firewall. It covers the RFC 1918 ranges by default; private prefixes outside RFC 1918 must be added to "Private Traffic Prefixes".
Prerequisites and limitations (from the official "Known limitations"): the hub cannot have custom route tables, and defaultRouteTable cannot contain static routes whose next hop is a VNet connection; save the existing configuration before enabling (the system does not save it automatically); enabling changes the prefixes advertised to on-premises (ExpressRoute receives RFC 1918 summary prefixes); inspection of cross-hub traffic is possible only through routing intent, and all hubs must have it enabled.
When: how to choose
- Choose hub-spoke: 1–2 regions, few branches, a need for specific NVAs or a Route Server, a need for custom resources in the hub, and a team comfortable with routing.
- Choose Virtual WAN: multiple regions, dozens of branch sites or many P2S users, a need for branch-to-branch transit, and a preference to hand routing to a managed service.
- When unsure: starting with hub-spoke is more common because you can evolve it gradually. But if you will certainly have 30+ branches within three years, go straight to vWAN and skip one migration.
- "VNet peering is transitive." It is not. If spoke A peers with the hub and the hub peers with spoke B, A and B still cannot reach each other unless a UDR points to a device that can forward the traffic, or AVNM direct connectivity is used.
- "Virtual WAN is always more expensive." The hub itself is billed hourly, but it replaces self-built gateways, a Route Server and a lot of operational time. Compare total cost of ownership.
- "You can keep custom route tables with routing intent enabled." You cannot; the two are mutually exclusive.
- "A private DNS zone can link directly to a vWAN hub." It cannot; you need a shared services VNet.
Architecture diagram: two ways to connect the same set of Landing Zones
Data flow diagram: traffic from spoke A to spoke B
Interactive decision tool: hub-spoke or Virtual WAN
Answer six questions. The tool scores each one against the considerations in the CAF network topology guidance and explains its reasoning at each step in the terminal. The scores are only a starting point for discussion, not an official algorithm.
Create hub and spoke and set up peering
# hub (connectivity subscription) az account set -s $SUB_CONN az network vnet create -g $RG_CONN -n $HUB -l $LOC \ --address-prefixes 10.0.0.0/16 --tags $TAGS az network vnet subnet create -g $RG_CONN --vnet-name $HUB -n AzureFirewallSubnet --address-prefixes 10.0.0.0/26 az network vnet subnet create -g $RG_CONN --vnet-name $HUB -n AzureFirewallManagementSubnet --address-prefixes 10.0.0.64/26 az network vnet subnet create -g $RG_CONN --vnet-name $HUB -n GatewaySubnet --address-prefixes 10.0.1.0/27 HUB_ID=$(az network vnet show -g $RG_CONN -n $HUB --query id -o tsv) # spoke (application subscription) az account set -s $SUB_APP az network vnet create -g $RG_APP -n $SPOKE -l $LOC --address-prefixes 10.1.0.0/16 --tags $TAGS # Deny-Subnet-Without-Nsg under corp / landingzones rejects subnets with no NSG: create the NSGs first az network nsg create -g $RG_APP -n nsg-snet-app-cc -l $LOC az network nsg create -g $RG_APP -n nsg-snet-pe-cc -l $LOC az network vnet subnet create -g $RG_APP --vnet-name $SPOKE -n snet-app --address-prefixes 10.1.1.0/24 \ --network-security-group nsg-snet-app-cc --default-outbound false az network vnet subnet create -g $RG_APP --vnet-name $SPOKE -n snet-pe --address-prefixes 10.1.2.0/24 \ --network-security-group nsg-snet-pe-cc --default-outbound false SPOKE_ID=$(az network vnet show -g $RG_APP -n $SPOKE --query id -o tsv) # Bidirectional peering (create on both sides; use full resource IDs across subscriptions) az network vnet peering create -g $RG_APP -n peer-spoke-to-hub --vnet-name $SPOKE \ --remote-vnet $HUB_ID --allow-vnet-access --allow-forwarded-traffic az account set -s $SUB_CONN az network vnet peering create -g $RG_CONN -n peer-hub-to-myapp --vnet-name $HUB \ --remote-vnet $SPOKE_ID --allow-vnet-access --allow-forwarded-traffic
# Check peering status: both sides should show Connected / FullyInSync
az network vnet peering list -g $RG_CONN --vnet-name $HUB \
--query "[].{name:name,state:peeringState,sync:peeringSyncLevel,fwd:allowForwardedTraffic}" -o table
Name State Sync Fwd ----------------- --------- ------------ ----- peer-hub-to-myapp Connected FullyInSync True
Virtual WAN comparison commands (read to understand; not created in the lab)
az network vwan create -g $RG_CONN -n vwan-alz --type Standard -l $LOC
az network vhub create -g $RG_CONN -n vhub-cc --vwan vwan-alz --address-prefix 10.100.0.0/23 -l $LOC
az network vhub connection create -g $RG_CONN --vhub-name vhub-cc -n conn-myapp --remote-vnet $SPOKE_ID
# Routing intent is configured on the secured hub (the one containing Azure Firewall):
az network vhub routing-intent create -g $RG_CONN --vhub vhub-cc -n ri-cc \
--routing-policies "[{name:InternetTraffic,destinations:[Internet],next-hop:<firewall-resource-id>},{name:PrivateTrafficPolicy,destinations:[PrivateTraffic],next-hop:<firewall-resource-id>}]"
The vWAN commands belong to the virtual-wan extension, and the parameter format changes between extension versions. Confirm it with az network vhub routing-intent create -h before running. Virtual hubs are billed hourly, so do not create one during the lab.
Lab 1: build hub and spoke, and verify that "peering is not transitive" (about 10 minutes, nearly free)
$SUB_CONN and $SUB_APP to the same value.az network vnet create -g $RG_APP -n vnet-spoke-test-cc -l $LOC --address-prefixes 10.2.0.0/16 \ --subnet-name snet-app --subnet-prefixes 10.2.1.0/24 --network-security-group nsg-snet-app-cc # Peer it only with the hub (both sides), not with the myapp spoke
az vm create -g $RG_APP -n vm-myapp-test --image Ubuntu2404 --size Standard_B1s \ --vnet-name $SPOKE --subnet snet-app --public-ip-address "" --nsg "" \ --admin-username azureuser --generate-ssh-keys az network nic show-effective-route-table -g $RG_APP -n vm-myapp-testVMNic -o table
Source State Address Prefix Next Hop Type Next Hop IP -------- ------- ---------------- --------------- ------------- Default Active 10.1.0.0/16 VnetLocal Default Active 10.0.0.0/16 VNetPeering Default Active 0.0.0.0/0 Internet Default Active 10.0.0.0/8 None Default Active ...
Note: the hub's 10.0.0.0/16 appears in the route table, but 10.2.0.0/16 does not; and the default next hop for 10.0.0.0/8 is None, so packets to spoke 2 are dropped.
az network vnet delete -g $RG_APP -n vnet-spoke-test-cc (delete the hub-side peering first).Case 1: a retail company with 120 stores, where hub-spoke no longer copes
Problem: each store has an S2S VPN to the VPN gateway of a single hub, and stores also need to reach each other's POS service. The self-built solution used a Route Server + NVA for transit, the route tables often exceeded their limits, and a single change took two weeks. Approach: migrate to Virtual WAN Standard with one hub per region; store VPN connections attach to the nearest hub, branch-to-branch transit is handled by the hub router, and the secured hub has the Internet + Private routing policies enabled. Constraints: the custom jump hosts and DNS forwarders that were in the original hub could only be moved to a shared services spoke; during migration the two topologies coexist, so duplicate prefix advertisements must be prevented.
Case 2: a financial customer insists on hub-spoke
Problem: regulators require all inbound and outbound traffic to pass through a designated vendor's NVA, and a dedicated log collector must be deployed in the hub. Approach: keep the traditional hub-spoke; deploy the NVA in the hub as an HA-ports load balancer, with spoke UDRs pointing to the internal load balancer frontend IP; use AVNM routing configurations to push the UDRs out in bulk. Constraints: NVA high availability, symmetric routing and scaling must all be designed by the team itself.
Case 3: ExpressRoute on-premises routes misbehave after enabling routing intent
Problem: after a team enabled the Private routing policy on a vWAN hub, the on-premises core router began receiving a 10.0.0.0/8 summary route, which conflicted with the 10.0.0.0/8 already present on-premises. Approach: following the official guidance, on-premises was changed to advertise more specific prefixes instead of the RFC 1918 summary ranges. Lesson: before enabling routing intent, save the route tables and assess how the prefixes advertised on-premises will change.
Common errors and fixes
Peering state shows Initiated and traffic does not flow
Cause: only one side of the peering was created. Diagnosis: az network vnet peering show ... --query peeringState. Fix: create the reverse peering on the remote VNet; the state changes to Connected. Cross-tenant peering requires permissions on both sides.
(VnetAddressSpacesOverlap) Cannot create or update peering ... address space overlaps
Cause: the two VNets have overlapping addresses. Fix: addresses must not overlap before peering; existing overlaps can only be resolved by changing the address space (for a VNet with resources, you can only add prefixes and then migrate). Prevention: the Module 2 IPAM pool.
Spoke A can ping the hub but times out to spoke B
Cause: peering is not transitive. Fix: add a UDR on the spoke subnet pointing to the hub firewall and allow the traffic in the firewall; or use an AVNM direct connectivity group. Diagnosis: az network watcher show-next-hop will show the next hop as None.
Routing intent cannot be configured because the hub has custom route tables
Cause: routing intent requires the hub to have only defaultRouteTable and noneRouteTable. Fix: save and delete the custom route tables and the static routes whose next hop is a VNet connection, then configure routing intent.
Linking a private DNS zone to the hub in vWAN fails, or the hub cannot be found
Cause: a virtual hub is not an ordinary VNet and cannot be linked to a private DNS zone. Fix: create a shared services spoke, link the private DNS zones to it and deploy a DNS Private Resolver; point each spoke's DNS server at the Resolver's inbound endpoint.
1. List all peerings on the hub VNet with their names, states, sync levels and whether forwarded traffic is allowed.
az network vnet peering list -g rg-alz-conn-cc --vnet-name vnet-hub-cc --query "[].{name:name,state:peeringState,sync:peeringSyncLevel,fwd:allowForwardedTraffic,gw:allowGatewayTransit}" -o table2. Check the effective routes of the test VM's NIC and find the next hop for 10.2.0.0/16.
az network nic show-effective-route-table -g rg-lz-myapp-cc -n vm-myapp-testVMNic --query "value[?contains(join(',',addressPrefix),'10.')]" -o tableThe company has 1 region and 2 data centres (ExpressRoute), and plans to expand to 3 regions and 40 branch offices within two years, with branch offices needing to reach each other. The network team has only 2 people. Which topology do you recommend?
Recommend Virtual WAN Standard: multi-region hubs are fully meshed automatically, branch-to-branch transit is native, P2S / S2S / ExpressRoute are all managed in the hub, and routing intent needs only two policies for firewall inspection, which suits a small team. Plan ahead for: the /23 prefix for each hub; the shared services spoke (DNS Private Resolver with private DNS zone links); the SKU requirements for ExpressRoute circuits connecting to vWAN; and the effect on advertised on-premises prefixes when routing intent is enabled. If you must go live now with only one region, you can also start with hub-spoke, but reserve address space for the future migration.
Verified teaching videos
Official documentation
- CAF: Define an Azure network topology
- How to configure Virtual WAN Hub routing policies
- Hub-spoke network topology in Azure
Video storyboard (about 90 seconds)
This course material cannot generate video or MP3 directly, but storyboards and narration scripts are provided for use with a video tool.
Visual: on the left, a hub VNet with three spokes connected by peering lines; a packet travelling from spoke A toward spoke B stops in front of the hub and turns red.
Narration: VNet peering is not transitive. For spokes to reach each other, you must design the routing explicitly.
Visual: a route table pops up beside the spoke subnet; 0.0.0.0/0 points to firewall 10.0.0.4; the packet passes through the firewall and reaches spoke B.
Narration: in a traditional hub-spoke, the route table sends traffic to the hub firewall, and the firewall decides whether to allow or deny it.
Visual: on the right, the view changes to two virtual hubs that automatically connect into one line; branch sites and P2S users connect to the hubs.
Narration: the Virtual WAN hub is managed by Microsoft, hubs interconnect automatically, and branches can transit between each other.
Visual: two switches appear on the hub, Internet and Private; when turned on, every arrow passes through the firewall icon.
Narration: routing intent replaces a complex route table with two policies, but it is mutually exclusive with custom route tables, so save the original configuration before enabling it.
Module 2 · IP Address Planning and Azure Virtual Network Manager
- Plan addresses in layers (overall pool → region → Landing Zone → subnet), avoid the reserved ranges in Azure, and know the minimum size of each special subnet.
- Understand the four building blocks of AVNM: scope (management group or subscription), network groups (static members or dynamic members via Azure Policy), configurations (connectivity, security admin, routing), and deployment to regions.
- Use IPAM pools (root pools, child pools, static CIDRs, allocation by number of IPs) to automatically assign non-overlapping addresses to new spokes, and delegate the permission to use the pool to application teams.
What: what a good address plan looks like
- Non-overlapping: across VNets within Azure, between Azure and on-premises, and between Azure and other clouds, nothing overlaps. Overlapping VNets cannot be peered, and cannot be routed through the same gateway.
- Summarizable: each region has one contiguous block (such as canadacentral
10.0.0.0/12), so routes can be summarized when advertised on-premises, and firewall rules can be written per region. - Leave headroom: allocate spokes to actual need (many applications are fine with a
/24), but reserve room for growth within the regional pool. A VNet can have prefixes added later, but existing subnets cannot be shrunk. - Avoid reserved ranges:
224.0.0.0/4(multicast),255.255.255.255/32,127.0.0.0/8,169.254.0.0/16and168.63.129.16/32(Azure platform DNS and health probes) cannot be used as VNet addresses. Beyond RFC 1918,100.64.0.0/10(RFC 6598) is also commonly used for expansion. - Azure reserves 5 addresses in each subnet: the network address, the default gateway (.1), the two Azure DNS mapping addresses (.2 and .3), and the broadcast address. So a
/29has only 3 usable addresses.
| Special subnet | Fixed name? | Suggested size | Notes |
|---|---|---|---|
| Azure Firewall | AzureFirewallSubnet | /26 | Basic and forced tunneling also require AzureFirewallManagementSubnet (/26) |
| VPN / ExpressRoute gateway | GatewaySubnet | /27 or larger | Connecting 16 ExpressRoute circuits requires a /26; NSGs are not supported |
| Azure Bastion | AzureBastionSubnet | /26 or larger | Developer SKU does not need this subnet |
| DNS Private Resolver | Any name; delegated to Microsoft.Network/dnsResolvers | /28–/24 | Inbound and outbound endpoints each use one subnet |
| Application Gateway v2 | Any name; dedicated | Recommended /24 | Autoscaling needs enough IPs |
| Virtual WAN hub | The hub's address prefix | Recommended /23 | Must not overlap with any spoke |
Why: why AVNM
When Landing Zones grow from 5 to 200, maintaining peerings, UDRs, NSG baselines and address tables by hand becomes unmanageable. Azure Virtual Network Manager is a platform service that manages VNets by "scope": you deploy a network manager in the connectivity subscription and set its scope to the landingzones management group, and it can see the VNets of all Landing Zones and push configurations to them in bulk.
How: AVNM building blocks
| Building block | Role | Key points |
|---|---|---|
| Scope | List of management groups or subscriptions | The network manager has visibility into, and configuration rights over, only the resources within its scope |
| Network group | A logical collection of VNets (or subnets) | Static members are added manually; dynamic members are added automatically by Azure Policy (effect addToNetworkGroup) based on conditions such as tags or names |
| Connectivity configuration | hub-and-spoke or mesh | hub-and-spoke creates peerings automatically, with optional "direct connectivity between spokes" (connectivity groups) and "use hub gateway" |
| Security admin configuration | Security admin rules | Evaluated before NSGs: Allow (passed on to the NSG), Deny (dropped directly), Always Allow (allowed directly, skipping the NSG) |
| Routing configuration | Bulk UDR management | Push routes such as "0.0.0.0/0 → firewall" to a network group |
| IPAM | IP address pool | Root pools and child pools (up to 7 levels), static CIDRs, automatic allocation by quantity, usage statistics, delegation |
| Deployment (commit) | Push the configuration to the specified regions | Nothing takes effect until it is deployed; it can be rolled out region by region |
How IPAM works
- The platform team creates a root pool (such as
10.0.0.0/11), then creates child pools for each region. - Register ranges already in use on-premises or in other clouds as static CIDRs, to prevent them from being allocated again.
- Grant application teams the IPAM Pool User role on the pool (add Network Manager Read as well if they cannot discover the pool).
- When an application team creates a VNet, it only states "I need 256 addresses from pool-cc" (
--ipam-allocations), and the system selects a non-overlapping CIDR automatically. When the VNet is deleted, the addresses return to the pool.
When: when to use it
- Once you have more than a dozen Landing Zones, or several teams create VNets on a self-service basis, introduce IPAM and network groups.
- When you need a company-wide rule that "blocks inbound RDP / SSH from the internet everywhere, and application teams cannot override it with an NSG", use security admin rules.
- At small scale, in a single region, where the platform team creates all VNets uniformly with IaC, a single IaC variable file can be enough; AVNM can be introduced later.
- "AVNM takes effect as soon as the configuration is created." It must be deployed (committed) to the target regions.
- "Security admin rules replace NSGs." They are evaluated before NSGs; traffic that an Allow rule lets through still has to pass the NSG.
- "Giving every spoke a /16 is the safest approach." It will quickly exhaust the regional pool and also make on-premises route tables larger.
- "AVNM is still billed per subscription." New instances are billed per VNet; subscription-based billing for older instances will be fully retired on 2028-02-06.
Address layering and AVNM scopes
Evaluation order of security admin rules and NSGs
Interactive simulator: IPAM pool allocation
This simulates how IPAM finds, within child pool pool-cc 10.0.0.0/12, the first aligned, unused block that matches "the number of IPs needed". You can also enter a CIDR by hand to check whether it overlaps an allocated range or a static CIDR. The algorithm is a simplified teaching version: the real service also guarantees non-overlap, but which block it picks depends on the service's result.
Create the network manager, network groups and the hub-and-spoke connectivity configuration
az extension add -n virtual-network-manager --upgrade az account set -s $SUB_CONN az network manager create -g $RG_CONN -n avnm-alz -l $LOC \ --scope-accesses Connectivity SecurityAdmin Routing \ --network-manager-scopes management-groups="/providers/Microsoft.Management/managementGroups/landingzones" \ --description "ALZ platform network manager" az network manager group create -g $RG_CONN --network-manager-name avnm-alz -n ng-corp-spokes \ --description "corp landing zone spokes" az network manager group static-member create -g $RG_CONN --network-manager-name avnm-alz \ --network-group-name ng-corp-spokes -n myapp --resource-id $SPOKE_ID NG_ID=$(az network manager group show -g $RG_CONN --network-manager-name avnm-alz -n ng-corp-spokes --query id -o tsv) az network manager connect-config create -g $RG_CONN --network-manager-name avnm-alz \ --configuration-name cc-hubspoke-cc --connectivity-topology HubAndSpoke \ --hub resource-id=$HUB_ID resource-type=Microsoft.Network/virtualNetworks \ --applies-to-groups network-group-id=$NG_ID group-connectivity=None use-hub-gateway=true is-global=false \ --delete-existing-peering false CC_ID=$(az network manager connect-config show -g $RG_CONN --network-manager-name avnm-alz --configuration-name cc-hubspoke-cc --query id -o tsv) # Takes effect only after deployment (commit) to the region az network manager post-commit -g $RG_CONN --network-manager-name avnm-alz \ --commit-type Connectivity --configuration-ids $CC_ID --target-locations $LOC az network manager list-deploy-status -g $RG_CONN --network-manager-name avnm-alz \ --deployment-types Connectivity --regions $LOC
IPAM pools
az network manager ipam-pool create -g $RG_CONN --network-manager-name avnm-alz -n pool-azure \ -l $LOC --address-prefixes 10.0.0.0/11 --display-name "Azure root pool" az network manager ipam-pool create -g $RG_CONN --network-manager-name avnm-alz -n pool-cc \ -l $LOC --address-prefixes 10.0.0.0/12 --parent-pool-name pool-azure --display-name "canadacentral" # Register ranges that are not in Azure but are already in use az network manager ipam-pool static-cidr create -g $RG_CONN --network-manager-name avnm-alz \ --pool-name pool-cc -n legacy-dc --address-prefixes 10.15.0.0/16 az network manager ipam-pool get-pool-usage -g $RG_CONN --network-manager-name avnm-alz -n pool-cc
# Application team: request addresses from the pool by quantity when creating a VNet (the --ipam-allocations usage from the official docs)
POOL_ID=$(az network manager ipam-pool show -g $RG_CONN --network-manager-name avnm-alz -n pool-cc --query id -o tsv)
az network vnet create -g $RG_APP -n vnet-spoke-payroll-cc -l $LOC \
--ipam-allocations "[{\"numberOfIpAddresses\":\"256\",\"id\":\"$POOL_ID\"}]"
{
"newVNet": {
"addressSpace": {
"addressPrefixes": [ "10.2.0.0/24" ],
"ipamPoolPrefixAllocations": [ { "numberOfIpAddresses": "256", "pool": { "id": ".../ipamPools/pool-cc" } } ]
},
"name": "vnet-spoke-payroll-cc",
"provisioningState": "Succeeded"
}
}
The az network manager subcommands change between extension versions (such as ipam-pool, static-cidr, get-pool-usage); confirm the parameter names with -h before running.
Lab 2: manage hub-spoke with AVNM and allocate addresses from an IPAM pool (about 15 minutes, a small charge per VNet)
landingzones management group (if you have only one subscription, use --network-manager-scopes subscriptions=/subscriptions/$SUB_APP instead).tags['workload'] exists on the network group, and observe that AVNM automatically generates an Azure Policy definition and assignment.--delete-existing-peering false, which avoids deleting the peerings you built by hand in Module 1. After deployment, check that list-deploy-status shows Deployed.pool-azure and pool-cc, associate the existing addresses of the hub and the myapp spoke with the pool (portal: pool → Allocations → Associate resources), then use --ipam-allocations to create a test VNet with 256 addresses.
Name Address prefixes Total IPs Allocated Available pool-cc 10.0.0.0/12 1048576 131328 917248
az network watcher test-ip-flow to verify that it is still denied.Case 1: after an acquisition, 30% of VNets overlap with the acquired company's
Problem: both companies started with 10.0.0.0/16, so they cannot be peered after the merger. Approach: create a new IPAM root pool 10.64.0.0/10 for new Landing Zones, and migrate the overlapping VNets step by step: add a new prefix, migrate the subnets, then remove the old prefix. For short-term connectivity, work around the overlap with private endpoints or a Private Link service. Lesson: address planning must cover future acquisitions and multi-cloud.
Case 2: an application team opened RDP with an NSG
Problem: a team opened internet access to 3389 on an NSG to troubleshoot, and within hours it was under brute-force attack. Approach: the platform team used AVNM security admin rules to push Deny rules for inbound 22 / 3389 to all Landing Zone network groups, together with the Deny-MgmtPorts-Internet policy on landingzones (which blocks the creation of NSG rules). Constraints: security admin rules also block legitimate traffic, so exceptions such as the Bastion subnet need an Always Allow design.
Case 3: a subnet that is too small stops Application Gateway from scaling out
Problem: App Gateway v2 was deployed in a /27 subnet; during a peak sales event, autoscaling reached its limit and no free IPs were left. Approach: create a new /24 subnet and migrate the gateway. Lesson: in the address plan, record the official suggested size for each special subnet.
Common errors and fixes
The configuration was created, but the spoke has no peering and no rules
Cause: it was not deployed to the target region, or the VNet is not in a network group / not within the manager's scope. Diagnosis: az network manager list-deploy-status, az network manager list-effective-connectivity-config --virtual-network-name .... Fix: deploy to the region where the VNet is located, and check that the scope includes that subscription.
InsufficientAddressSpace / not enough addresses left in the pool to allocate
Cause: the child pool has too little remaining space, or there is no sufficiently large aligned free block (fragmentation). Fix: check get-pool-usage; expand the child pool or create a new one; reclaim unused allocations.
The application team cannot see the IPAM pool
Cause: The identity has only the IPAM Pool User role, but the discovery pool and VNets also need read permission. Fix: Following the official guidance, also grant Network Manager Read access.
NSG allows the port, but traffic is still denied
Cause: An AVNM security admin rule with Deny takes precedence over the NSG. Diagnosis: In the portal, go to VNet → Network Manager → Effective security admin rules; or run az network manager list-effective-security-admin-rule. Fix: Adjust the rule at the platform level, or add an Always Allow exception.
After you deploy the connectivity configuration, the peering that you created by hand in Module 1 is deleted
Cause: The connectivity configuration has “Delete existing peerings” turned on. Fix: When you redeploy, set --delete-existing-peering false. Once AVNM manages the connection, don't maintain a manual peering for the same pair of VNets.
1. Check the deployment status of the connectivity configuration for the network manager in canadacentral.
az network manager list-deploy-status -g rg-alz-conn-cc --network-manager-name avnm-alz --deployment-types Connectivity --regions canadacentral
2. How many usable IP addresses are there in a /26 subnet?
python3 -c "print(2**(32-26) - 5)" # 59: Azure reserves 5 addresses in every subnet
The company plans 150 landing zones over the next 3 years, across canadacentral and canadaeast. On-premises uses 10.0.0.0/14 and 172.16.0.0/12. Provide an address plan and an AVNM rollout plan.
Keep the Azure root pool clear of on-premises ranges: for example 10.64.0.0/11, split by region into 10.64.0.0/12 (cc) and 10.80.0.0/12 (ce), each giving about 1.04 million addresses. Give each hub a /20, which leaves room for the firewall, gateways, Resolver, Bastion, and future services. Spokes default to /24, and requests that need many IPs, such as AKS, get /22 or /20. Register the on-premises 10.0.0.0/14 as a static CIDR (if it falls inside the pool). Set the AVNM scope to landingzones + connectivity. Divide network groups dynamically by corp / online and by region. Use a hub-and-spoke connectivity configuration (corp uses the hub gateway). Set security admin rules as the global baseline. Delegate the IPAM Pool User role to the identity of the subscription vending pipeline.
Verified teaching videos
Official documentation
- What is Azure Virtual Network Manager?
- IP address management (IPAM) in AVNM
- Security admin rules
- CAF: Plan for IP addressing
Video storyboard (about 80 seconds)
Visual: A long 10.0.0.0/11 bar is split into two regional pools, and then into smaller blocks assigned to hubs and spokes.
Narration: Good address planning goes from big to small: the total pool, regions, landing zones, and subnets. No layer overlaps another.
Visual: An app team fills in “needs 256 addresses.” IPAM finds the first free block in the strip and highlights it.
Narration: With IPAM, teams only say how many addresses they need. The platform picks a non-overlapping range for them.
Visual: The VNets in a network group light up together, and peering lines appear automatically. A packet on port 22 is blocked at the security admin rule, and the NSG behind it is greyed out.
Narration: AVNM pushes connectivity and security baselines by network group. Security admin rules are evaluated before NSGs, and they take effect after they are deployed to a region.
Module 3 · Hub Design: Azure Firewall, UDRs, and Forced Tunneling
- Choose an Azure Firewall SKU based on features, throughput, and price. Know the Basic limits: 250 Mbps, no DNS proxy, threat intelligence alerts only, and a management subnet is required.
- Explain Azure route selection: longest prefix match wins first. When prefixes are the same length, UDR > BGP > system routes. Also explain what “disable gateway route propagation” does.
- Understand the firewall policy rule processing order: the parent policy is processed first; DNAT → network rules → application rules. Rules are terminating. If nothing matches, traffic is denied by default.
- Design forced tunneling and explicit outbound access. Understand how the change to “default outbound access” affects subnets that have no UDR.
What: what's in the hub
An ALZ hub (or secured virtual hub) typically contains: Azure Firewall (centralized inspection of outbound, east-west, and hybrid traffic), VPN / ExpressRoute gateways (Module 4), DNS Private Resolver (Module 5), and Azure Bastion (operations access). Spoke subnets send traffic to the firewall's private IP through a UDR (in this hour, 10.0.0.4, the first usable address in AzureFirewallSubnet).
| Capability | Basic | Standard | Premium |
|---|---|---|---|
| Throughput | Up to 250 Mbps | Up to 30 Gbps | Up to 100 Gbps |
| Application rules (FQDN, based on SNI / Host) | ✓ | ✓ | ✓ |
| FQDNs in network rules (requires DNS proxy) | — | ✓ | ✓ |
| DNS proxy / custom DNS | — | ✓ | ✓ |
| Threat intelligence | Alert only | Alert and deny | Alert and deny |
| Web categories | — | ✓ (FQDN-based) | ✓ (full URL-based) |
| TLS inspection, IDPS, URL filtering | — | — | ✓ |
| Forced tunneling | ✓ | ✓ | ✓ |
Management NIC (AzureFirewallManagementSubnet) | Required | Required for forced tunneling | Required for forced tunneling |
The table follows the official “Azure Firewall features by SKU” (updated 2026-11-04). Pricing is billed per deployed hour plus data processed; see the pricing page for current rates.
How 1: how Azure chooses a route
- Each subnet has an effective route table = system routes (VNet-local, peering, default
0.0.0.0/0 → Internet, RFC 1918 ranges → None) + BGP routes (learned from on-premises or vWAN through the gateway) + UDRs. - First apply longest prefix match: for
10.2.1.4,10.2.0.0/16is more specific than0.0.0.0/0. - When prefix lengths are equal: UDR beats BGP, and BGP beats system routes.
- “Propagate gateway routes = No” on a route table (CLI:
--disable-bgp-route-propagation true) keeps BGP routes out of the subnet. This is often used to make sure traffic to on-premises also goes through the firewall.
How 2: how the firewall decides
- Threat intelligence (if enabled) is checked first.
- Rule collection groups in the inherited parent policy are always processed before the child policy. Within one policy, rule collection groups are processed by priority (100 is highest … 65,000), then rule collections by their priority.
- Regardless of priority, the type order is fixed: DNAT → network rules → application rules. The first match terminates processing.
- Application rules apply only to HTTP / HTTPS / MSSQL. HTTP is matched on the Host header, and HTTPS is matched only on SNI.
- If nothing matches, the built-in infrastructure rule collection is checked, and finally traffic is denied by default. The firewall is stateful, so return traffic for allowed connections is automatically permitted.
How 3: forced tunneling and explicit outbound access
- Spoke level:
0.0.0.0/0 → VirtualAppliance 10.0.0.4. All outbound traffic goes to the firewall first, which SNATs it to its public IP. - Firewall-level forced tunneling: the firewall itself doesn't go directly to the internet. Instead, it sends internet traffic to on-premises or to another NVA. It needs a management NIC so that its management traffic can still reach Azure directly. The data path can work without a public IP (Standard / Premium).
- BGP default route: when on-premises advertises
0.0.0.0/0over ExpressRoute or VPN, every subnet that learns BGP routes sends its internet traffic back on-premises. This is itself a form of forced tunneling, and a common surprise. - Default outbound access: for API versions released after 2026-03-31, subnets in new VNets default to
defaultOutboundAccess=false(the portal has defaulted to private for some time). A VM in a private subnet with no NAT gateway, public IP, load balancer outbound rule, or UDR to the firewall cannot reach the internet, and Windows activation and updates will fail too. ALZ assigns the audit policyEnforce-Subnet-Private(Audit, default DoNotEnforce) tolandingzonesandplatform.
When: design trade-offs
- Labs and small environments: Firewall Basic. General production: Standard. Needs TLS inspection, IDPS, or PCI DSS: Premium.
- Whether east-west traffic (between spokes) goes through the firewall: if security requirements are high, send it through. For several VNets of one latency-sensitive app, you can use an AVNM direct-connectivity group plus security admin rules.
- Don't set a
0.0.0.0/0UDR onGatewaySubnet(ExpressRoute gateways don't support it). If inbound traffic from on-premises must pass through the firewall, write UDRs on GatewaySubnet for the spoke prefixes.
- “A UDR makes you secure.” Without firewall rules, traffic is denied by default. Rules that are too broad (Any → Any) are just as bad as having no firewall.
- “Application rules inspect the URL path of HTTPS traffic.” Only Premium's TLS inspection can see the URL. Other SKUs see only SNI.
- “A network rule with a lower priority number always comes before an application rule.” Regardless of the number, network rules always come before application rules.
- “Delete the public IP on a VM and it can't reach the internet.” In a non-private subnet, it may still have default outbound access.
Hub layout and route tables
Route selection and firewall rule processing order
Core animation: three packet paths from a VM in a spoke
Choose a scenario and step through it: VM 10.1.1.4 accesses the internet, accesses 10.2.1.4:5000 in another spoke, and resolves and accesses a storage account's private endpoint. You can turn off “UDR associated” or “firewall rule allows” to see what the real platform does.
Deploy Firewall Basic and a policy
az extension add -n azure-firewall --upgrade az account set -s $SUB_CONN az network public-ip create -g $RG_CONN -n pip-afw-hub-cc --sku Standard -l $LOC az network public-ip create -g $RG_CONN -n pip-afw-hub-cc-mgmt --sku Standard -l $LOC az network firewall policy create -g $RG_CONN -n afwp-hub-cc -l $LOC --sku Basic az network firewall create -g $RG_CONN -n $FW -l $LOC --sku AZFW_VNet --tier Basic \ --firewall-policy afwp-hub-cc --vnet-name $HUB \ --conf-name ipconfig1 --public-ip pip-afw-hub-cc \ --m-conf-name mgmtconfig --m-public-ip pip-afw-hub-cc-mgmt FW_IP=$(az network firewall show -g $RG_CONN -n $FW --query "ipConfigurations[0].privateIPAddress" -o tsv) echo $FW_IP # 10.0.0.4
Rules: network rules (between spokes) and application rules (outbound allow list)
az network firewall policy rule-collection-group create -g $RG_CONN --policy-name afwp-hub-cc \ -n rcg-lz-myapp --priority 300 az network firewall policy rule-collection-group collection add-filter-collection -g $RG_CONN \ --policy-name afwp-hub-cc --rcg-name rcg-lz-myapp -n net-spoke-to-spoke --collection-priority 200 \ --action Allow --rule-type NetworkRule --rule-name myapp-to-test-5000 \ --source-addresses 10.1.0.0/16 --destination-addresses 10.2.0.0/16 --ip-protocols TCP --destination-ports 5000 az network firewall policy rule-collection-group collection add-filter-collection -g $RG_CONN \ --policy-name afwp-hub-cc --rcg-name rcg-lz-myapp -n app-os-updates --collection-priority 300 \ --action Allow --rule-type ApplicationRule --rule-name ubuntu-and-msft \ --source-addresses 10.1.0.0/16 --protocols Http=80 Https=443 \ --target-fqdns "*.ubuntu.com" "packages.microsoft.com"
UDR for the spoke subnet
az account set -s $SUB_APP az network route-table create -g $RG_APP -n rt-snet-app-cc -l $LOC --disable-bgp-route-propagation true az network route-table route create -g $RG_APP --route-table-name rt-snet-app-cc -n default-to-afw \ --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address 10.0.0.4 # Explicitly override the regional pool: traffic between spokes goes through the firewall (more specific than the system route 10.0.0.0/8 → None) az network route-table route create -g $RG_APP --route-table-name rt-snet-app-cc -n azure-cc-to-afw \ --address-prefix 10.0.0.0/12 --next-hop-type VirtualAppliance --next-hop-ip-address 10.0.0.4 az network vnet subnet update -g $RG_APP --vnet-name $SPOKE -n snet-app --route-table rt-snet-app-cc az network nic show-effective-route-table -g $RG_APP -n vm-myapp-testVMNic -o table
Source State Address Prefix Next Hop Type Next Hop IP -------- ------- ---------------- ---------------- ------------- Default Active 10.1.0.0/16 VnetLocal Default Active 10.0.0.0/16 VNetPeering User Active 10.0.0.0/12 VirtualAppliance 10.0.0.4 User Active 0.0.0.0/0 VirtualAppliance 10.0.0.4 Default Invalid 0.0.0.0/0 Internet
The hub's 10.0.0.0/16 (peering route) and this VNet's 10.1.0.0/16 are more specific than /12, so access to the hub and to this VNet does not go through the firewall. Access to other spokes does.
Verify (no need to log in to the VM)
az vm run-command invoke -g $RG_APP -n vm-myapp-test --command-id RunShellScript \ --scripts "curl -sI https://archive.ubuntu.com | head -1; curl -s -m 8 https://example.com >/dev/null && echo allowed || echo blocked; curl -s -m 8 https://api.ipify.org" az network watcher show-next-hop -g $RG_APP --vm vm-myapp-test --source-ip 10.1.1.4 --dest-ip 1.1.1.1
HTTP/1.1 200 OK
blocked
20.104.xx.xx # firewall public IP (SNAT)
{ "nextHopIpAddress": "10.0.0.4", "nextHopType": "VirtualAppliance", "routeTableId": ".../routeTables/rt-snet-app-cc" }
Lab 3: Firewall Basic + UDR, so the spoke can only reach an allow list (about 25 minutes; from about US$0.4/hour, so delete it when done)
10.0.0.4.run-command to access archive.ubuntu.com (allowed) and example.com (denied), and confirm that the outbound IP is the firewall's public IP.AZFWApplicationRule | where TimeGenerated > ago(30m) | project TimeGenerated, SourceIp, Fqdn, Action, Policy, RuleCollection, Rule | order by TimeGenerated desc
az account set -s $SUB_CONN az network firewall delete -g $RG_CONN -n $FW az network public-ip delete -g $RG_CONN -n pip-afw-hub-cc az network public-ip delete -g $RG_CONN -n pip-afw-hub-cc-mgmt # After deleting the firewall, the spoke UDR still points to 10.0.0.4. If you keep it, the VM cannot reach the internet (expected). Modules 5 and 8 use it again.
Case 1: all Windows VM activations fail
Problem: A newly created corp landing zone uses private subnets and a UDR to the firewall, and Windows VMs cannot activate. Cause: The firewall doesn't allow KMS (azkms.core.windows.net:1688). Fix: Add platform dependencies such as KMS and Windows Update (using the WindowsUpdate FQDN tag) to the platform baseline rule collection group in the parent policy. Lesson: Put platform dependencies in the parent policy and application rules in the child policy, so that each team doesn't write its own copy.
Case 2: return traffic from a spoke to on-premises is dropped
Problem: Traffic from on-premises to the spoke enters the spoke directly from the gateway (system route), but the return traffic from the spoke to on-premises follows the UDR through the firewall. The firewall never saw the SYN, so it drops the return traffic (asymmetric routing). Fix: Add a UDR on GatewaySubnet: 10.1.0.0/16 → 10.0.0.4, and allow the matching network rule. Lesson: Write routes for both directions, inbound and outbound.
Case 3: Firewall Basic becomes a bottleneck
Problem: To save money, Basic was used in production. Once overnight backup traffic exceeded 250 Mbps, many connections timed out. Fix: Upgrade to Standard (the SKU can be upgraded, but it needs a planned maintenance window), and switch backup traffic to direct private endpoint access. Lesson: Basic suits small environments and labs.
Common errors and fixes
(AzureFirewallSubnetMissing) / subnet name is not AzureFirewallSubnet
Cause: The firewall requires a subnet with a fixed name (/26 recommended). Basic also requires AzureFirewallManagementSubnet. Fix: Create the subnets with the exact names, then retry.
VM internet access times out, and the effective route's next hop is VirtualAppliance 10.0.0.4
Diagnosis: Look for Deny entries for the source IP in the firewall logs, or run az network watcher test-connectivity. Common causes: no application rule; a rule uses an FQDN in a network rule but the SKU is Basic (no DNS proxy); the source was written as the subnet instead of the VNet. Fix: Add the correct rule.
Action: Deny. Reason: No rule matched. Proceeding with default action
This is a typical firewall log entry: no rule matched, which triggers the default deny. Check the rule collection group priority, the rule type (a network rule that matches first terminates processing), and the source and destination IPs and ports.
A VM in a private subnet cannot reach the internet without a UDR
Cause: defaultOutboundAccess=false. Fix: Configure explicit outbound access for the subnet: a UDR to the firewall, a NAT gateway, a load balancer outbound rule, or an instance public IP (in corp, the last one is blocked by Deny-Public-IP-On-NIC). After you change the subnet's private setting, you must stop and deallocate the VM for the change to take effect.
On-premises access to a spoke drops right after the connection is set up (asymmetric routing)
See production problem 2. Use az network watcher show-next-hop to check the next hop in each direction, and make sure both go through the firewall or both bypass it.
1. Use Network Watcher to check the next hop for a VM accessing 10.2.1.4.
az network watcher show-next-hop -g rg-lz-myapp-cc --vm vm-myapp-test --source-ip 10.1.1.4 --dest-ip 10.2.1.4
2. Disable gateway route propagation on the route table.
az network route-table update -g rg-lz-myapp-cc -n rt-snet-app-cc --disable-bgp-route-propagation true
On-premises advertises 0.0.0.0/0 over ExpressRoute. The spoke's route table has a UDR 0.0.0.0/0 → 10.0.0.4, and “Propagate gateway routes = Yes.” Where does the spoke's internet traffic go? What about the firewall's own internet traffic?
Spoke: the BGP-learned 0.0.0.0/0 and the UDR 0.0.0.0/0 have the same prefix length, and the UDR wins, so traffic goes to the firewall. Firewall subnet: if AzureFirewallSubnet also learns the on-premises 0.0.0.0/0, the firewall's internet traffic is sent back on-premises (forced tunneling). This requires the firewall to have a management NIC, otherwise its management traffic is affected. If you want the firewall to reach the internet directly, the design must stop that default route from propagating to AzureFirewallSubnet (for example, disable propagation on its route table and add 0.0.0.0/0 → Internet).
Verified teaching videos
Official documentation
- Azure Firewall features by SKU
- Azure Firewall rule processing logic
- Virtual network traffic routing
- Default outbound access
- Azure Firewall forced tunneling
Video storyboard (about 100 seconds)
Visual: A VM sends a packet, and the effective route table pops up beside it. There are two 0.0.0.0/0 routes. The user-defined route is highlighted, and the system route is greyed out and labeled Invalid.
Narration: Check routes first. When prefixes are the same length, a user-defined route beats BGP, and BGP beats system routes.
Visual: The packet crosses peering into the firewall, where threat intelligence, DNAT, network rules, and application rules light up one after another.
Narration: The firewall decides in a fixed order. Network rules always come before application rules. The first match terminates processing, and if nothing matches, the traffic is denied by default.
Visual: The allowed packet leaves for the internet with the firewall's public IP. Another packet headed to example.com is stopped by a red cross.
Narration: When traffic goes out, the firewall performs source NAT, so the outside world sees the firewall's public IP.
Visual: A private subnet with no route table; the packet stops at the subnet boundary.
Narration: New virtual networks default to private subnets. A VM with no explicit outbound method cannot reach the internet.
Module 4 · Hybrid Connectivity: VPN Gateway and ExpressRoute
- Compare S2S VPN, P2S VPN, and ExpressRoute private peering for use cases, bandwidth, SLA, and cost.
- Choose the right gateway SKU: the AZ SKUs for VPN (VpnGw1AZ–VpnGw5AZ), ErGw1Az–ErGw3Az and ErGwScale for ExpressRoute. Understand the 2025–2026 retirement and migration timeline.
- Understand how the hub gateway serves all spokes through gateway transit (allowGatewayTransit / useRemoteGateways), and how BGP routes enter the spokes.
- Know why Deny-HybridNetworking exists on the corp management group.
What: three hybrid connection types
| S2S VPN | P2S VPN | ExpressRoute private peering | |
|---|---|---|---|
| Path | IPsec / IKE tunnel over the public internet | Single client to Azure (OpenVPN, IKEv2, SSTP) | Carrier-provided dedicated line, not over the public internet |
| Authentication | Pre-shared key or certificate (certificate auth for S2S supported since 2026-05) | Certificate, RADIUS, Microsoft Entra ID | BGP session + carrier circuit |
| Bandwidth | Depends on SKU: hundreds of Mbps to several Gbps (affected by internet quality) | Concurrent connections by SKU | Circuit 50 Mbps – 10 Gbps (ExpressRoute Direct is higher); the gateway has its own cap |
| Typical use | Branch sites, backup path for ExpressRoute | Operators, remote users | Main data center link, high traffic, stable latency |
| Lab cost | Gateway billed hourly (VpnGw1AZ level) | Same gateway | Circuits are billed monthly and need a carrier: not created in this hour |
VPN Gateway: SKUs and retirement timeline (verified 2026-11-18)
- VpnGw1–5 (non-AZ): the AZ SKUs' new pricing took effect from 2025-01; new non-AZ SKUs have been blocked since 2025; migration ran from 2025-05 to 2026-09; retired 2026-09-30. All new gateways must use VpnGw1AZ–VpnGw5AZ.
- Legacy Standard / HighPerformance: the official page states deprecation on 2026-06-30. When Basic public IPs are migrated, they are automatically upgraded to VpnGw1AZ / VpnGw2AZ. After 2026-06, Microsoft will attempt automatic migration. Cases such as a subnet that is too small will fail and need manual handling.
- Basic SKU gateway: not retired. It can only be created with PowerShell or the CLI, does not support BGP or active-active, and is suitable for testing. The Basic public IP it references is being unlinked (available from 2026-03).
- Basic public IP: Azure retired it on 2025-09-30. The VPN gateway's Basic IP migration timeline has been extended to the end of 2026-06.
- Azure VPN Client for Linux (preview) was retired on 2026-08-31.
ExpressRoute: circuits and gateways
- Circuit: you create it in Azure, then the carrier provisions it. Billed by bandwidth and SKU (Local / Standard / Premium). Private peering connects to VNets; Microsoft peering connects to Microsoft 365 and Azure public services. Global Reach lets on-premises sites on two circuits communicate over the Microsoft backbone.
- Gateway SKUs: ErGw1Az (1 Gbps, 4 circuits), ErGw2Az (2 Gbps, 8 circuits), ErGw3Az (10 Gbps, 16 circuits, supports FastPath), ErGwScale (1 Gbps per scale unit, up to 40 units, autoscaling; 10 or more units support FastPath and 16 circuits). Non-AZ Standard / HighPerformance / UltraPerformance can move to AZ SKUs through the official gateway migration experience (Validate → Prepare → Migrate → Commit; commit within 15 days).
- FastPath: data from on-premises to the VM goes directly, bypassing the gateway; the gateway only handles route exchange.
- Limits: GatewaySubnet must be at least
/27(16 circuits need/26). GatewaySubnet doesn't support NSGs or UDRs with0.0.0.0/0, and BGP route propagation must be enabled. Up to 4 circuits at the same peering location can connect to the same VNet. ExpressRoute gateways don't support fragmentation; the maximum packet size is 1,400 bytes. A gateway advertises up to 1,000 routes, andsummarizedGatewayPrefixescan summarize spoke prefixes.
How: how the hub gateway serves spokes
- On the hub-to-spoke peering, set allowGatewayTransit = true. On the spoke-to-hub peering, set useRemoteGateways = true.
- The gateway learns on-premises prefixes through BGP and propagates them to the hub and to spokes that use the remote gateway (unless the spoke's route table has gateway route propagation disabled).
- The gateway advertises the hub and spoke address spaces to on-premises (when summarization is enabled, only the summary prefixes are advertised).
- If on-premises ↔ spoke traffic must go through the firewall: disable propagation on the spoke route table and write a UDR, and on GatewaySubnet write the spoke prefix → firewall (Module 3, case 2).
Why: Deny-HybridNetworking
On the corp management group, ALZ assigns Deny-HybridNetworking (display name “Deny the deployment of vWAN/ER/VPN gateway resources”, effect Deny). The denied resource types include expressRouteCircuits, expressRouteGateways, expressRoutePorts, virtualWans, virtualHubs, vpnGateways, p2sVpnGateways, vpnSites, and virtualNetworkGateways. The purpose: corp apps reach on-premises only through the platform hub, which prevents “shadow circuits” that bypass the firewall.
When: how to combine them
- Production data center: two ExpressRoute circuits (at different peering locations) plus S2S VPN as backup.
- Many branches: Virtual WAN (Module 1).
- Labs and PoCs: S2S VPN (VpnGw1AZ), deleted when done.
- “ExpressRoute is encrypted by default.” A dedicated circuit is not encrypted by itself. You need MACsec (ExpressRoute Direct) or IPsec running over it.
- “Non-AZ VPN SKUs can't be created anymore, but existing gateways keep working.” They were retired on 2026-09-30, so follow the official migration guidance.
- “A spoke can build its own VPN gateway as an emergency backup.” Under corp, Deny-HybridNetworking blocks this.
- “Gateway transit only needs to be enabled on the hub side.” Both sides of the peering must be set.
Hybrid connectivity and gateway transit
VPN Gateway SKU timeline
Interactive simulator: gateway SKU status checker
Choose a gateway SKU and a date. The simulator shows the status at that time according to the official timeline (can create / migration window / retired / not retiring), along with the recommended action.
VPN gateway (optional lab, billed hourly)
az account set -s $SUB_CONN
az network public-ip create -g $RG_CONN -n pip-vgw-hub-cc -l $LOC --sku Standard --zone 1 2 3
az network vnet-gateway create -g $RG_CONN -n vgw-hub-cc -l $LOC --vnet $HUB \
--gateway-type Vpn --vpn-type RouteBased --sku VpnGw1AZ \
--public-ip-addresses pip-vgw-hub-cc --asn 65515 --no-wait
# About 30–45 minutes; check the status
az network vnet-gateway show -g $RG_CONN -n vgw-hub-cc --query "{state:provisioningState,sku:sku.name,bgp:bgpSettings.bgpPeeringAddress}"
# Local network gateway (represents the on-premises VPN device; 203.0.113.10 is a documentation-only example address)
az network local-gateway create -g $RG_CONN -n lgw-onprem-tor -l $LOC \
--gateway-ip-address 203.0.113.10 --local-address-prefixes 192.168.0.0/16
az network vpn-connection create -g $RG_CONN -n cn-hub-to-onprem-tor \
--vnet-gateway1 vgw-hub-cc --local-gateway2 lgw-onprem-tor --shared-key "<from-key-vault>"
az network vpn-connection show -g $RG_CONN -n cn-hub-to-onprem-tor --query connectionStatus
{ "bgp": "10.0.1.30", "sku": "VpnGw1AZ", "state": "Succeeded" }
"NotConnected" # The example address has no real device, so the connection will not be established. This is expected.
Gateway transit and route checks
az network vnet peering update -g $RG_CONN --vnet-name $HUB -n peer-hub-to-myapp --set allowGatewayTransit=true az account set -s $SUB_APP az network vnet peering update -g $RG_APP --vnet-name $SPOKE -n peer-spoke-to-hub --set useRemoteGateways=true az account set -s $SUB_CONN az network vnet-gateway list-advertised-routes -g $RG_CONN -n vgw-hub-cc --peer 192.168.255.1 -o table az network vnet-gateway list-learned-routes -g $RG_CONN -n vgw-hub-cc -o table
ExpressRoute (read-only, does not create a circuit)
az network express-route list-service-providers --query "[?contains(join(',',peeringLocations),'Toronto')].{name:name,bw:bandwidthsOffered[].offerName}" -o json
# For reference only: gateway and connection when a real circuit exists
# az network vnet-gateway create -g $RG_CONN -n ergw-hub-cc --vnet $HUB --gateway-type ExpressRoute --sku ErGw1AZ
# az network vpn-connection create -g $RG_CONN -n cn-er-tor --vnet-gateway1 ergw-hub-cc --express-route-circuit2 <circuit-id> --authorization-key <key>
Cleanup (run right away; gateways are billed hourly)
az network vpn-connection delete -g $RG_CONN -n cn-hub-to-onprem-tor az account set -s $SUB_APP az network vnet peering update -g $RG_APP --vnet-name $SPOKE -n peer-spoke-to-hub --set useRemoteGateways=false az account set -s $SUB_CONN az network vnet-gateway delete -g $RG_CONN -n vgw-hub-cc az network local-gateway delete -g $RG_CONN -n lgw-onprem-tor az network public-ip delete -g $RG_CONN -n pip-vgw-hub-cc
Lab 4: VPN gateway + gateway transit + verify corp's Deny-HybridNetworking (about 50 minutes, mostly waiting; the gateway costs less than US$1)
az account set -s $SUB_APP az network vnet-gateway create -g $RG_APP -n vgw-shadow --vnet $SPOKE --gateway-type Vpn --sku VpnGw1AZ --public-ip-addresses pip-x
(RequestDisallowedByPolicy) Resource 'vgw-shadow' was disallowed by policy. Policy assignment: 'Deny-HybridNetworking' (Deny the deployment of vWAN/ER/VPN gateway resources) Scope: '/providers/Microsoft.Management/managementGroups/corp'
192.168.0.0/16 with Source=VirtualNetworkGateway. If the spoke's route table disables gateway route propagation, the route won't appear (this is how you make on-premises traffic go through the firewall).az network vnet-gateway list -g $RG_CONN -o table that the list is empty.Case 1: non-AZ gateway nearing retirement
Problem: During the 2026 summer review, six regions were found still running VpnGw2 as non-AZ SKUs. Fix: Following the “VPN Gateway SKU consolidation and migration” guide, first migrate the Basic public IP to Standard, then upgrade the SKU to VpnGw2AZ in the portal. Run it in a maintenance window and notify the on-premises network team in advance. Lesson: Add gateway SKU to the monthly network review checklist (Module 8).
Case 2: ExpressRoute gateway route count exceeded
Problem: The prefixes of all 200 spokes were advertised to on-premises, close to the gateway's advertising limit, and the on-premises router raised an alert. Fix: Set summarizedGatewayPrefixes on the hub VNet so that only the regional summary prefix 10.0.0.0/12 is advertised. Prerequisite: IPAM keeps each region's addresses contiguous (Module 2).
Case 3: private endpoint drops intermittently during gateway maintenance
Problem: On-premises access to an Azure SQL private endpoint over ExpressRoute had a few seconds of disruption every month. Cause: The official explanation: private endpoint connections are stateful, and during gateway maintenance the backend instances restart one at a time. Fix: Following official guidance, set the on-premises app's TCP timeout to 15–30 seconds and enable retries. For critical traffic, evaluate FastPath (requires ErGw3Az, or ErGwScale with 10 or more units).
Common errors and fixes
(RequestDisallowedByPolicy) ... Deny-HybridNetworking
The corp management group blocks creating VPN / ER gateways and vWAN. Fix: Create them in the connectivity subscription, or ask the platform team to evaluate an exemption (not recommended).
Symptom: creating a new gateway with the VpnGw1 (non-AZ) SKU is rejected
Non-AZ SKUs can no longer be created. Fix: Use an AZ SKU such as VpnGw1AZ, and use a Standard SKU public IP.
Connection state NotConnected / Connecting, and logs show IKE negotiation failures
Common causes: mismatched pre-shared keys, mismatched IKE / IPsec parameters, a changed public IP on the on-premises device, or the on-premises firewall not allowing UDP 500 / 4500. Diagnosis: az network vpn-connection packet-capture start, and the gateway diagnostic log IKEDiagnosticLog.
Symptom: enabling useRemoteGateways on the spoke side fails with a message that the remote VNet has no gateway
Either there is no gateway in the hub yet, or gateway transit isn't enabled on the hub side. Fix: Create the gateway first and allow gateway transit on the hub side, then enable it on the spoke side. Before you delete a gateway, turn off useRemoteGateways on the spoke.
An NSG or 0.0.0.0/0 UDR on GatewaySubnet causes gateway creation to fail or misbehave
This is explicitly unsupported. Fix: Remove the NSG and the default-route UDR, and make sure BGP route propagation is enabled on GatewaySubnet.
1. List the name, type, and SKU of every gateway in the connectivity resource group.
az network vnet-gateway list -g rg-alz-conn-cc --query "[].{name:name,type:gatewayType,sku:sku.name,aa:activeActive}" -o table2. View the routes that the VPN gateway has learned from on-premises.
az network vnet-gateway list-learned-routes -g rg-alz-conn-cc -n vgw-hub-cc -o table
The data center requires hybrid connectivity availability of 99.95% or higher, with 3 Gbps of daily traffic. Provide a design for the ALZ connectivity subscription.
Connect two ExpressRoute circuits to two different peering locations (for example, near Toronto and Montreal), each with bandwidth of at least 5 Gbps. In the hub, use ErGw3Az or ErGwScale (set the minimum units as needed to handle 3 Gbps and leave headroom for peaks), and enable FastPath to reduce the gateway bottleneck (check FastPath's limits). Add a VpnGw2AZ active-active S2S VPN as backup, with ExpressRoute routes preferred. Use /26 for GatewaySubnet. Spokes use gateway transit. If on-premises ↔ spoke traffic goes through the firewall, watch the UDRs on GatewaySubnet and symmetric routing. Monitor BGP sessions and gateway metrics, and include the gateway SKU in the monthly review.
Verified teaching videos
Official documentation
- What's new in Azure VPN Gateway (retirement timeline)
- VPN Gateway legacy SKUs
- About ExpressRoute virtual network gateways
- ExpressRoute gateway migration
Video storyboard (about 80 seconds)
Visual: Two links from the on-premises data center to the Azure hub: a solid line (ExpressRoute) and a dashed line (VPN tunnel).
Narration: ExpressRoute is primary and VPN is backup. Both gateway types can coexist in the same gateway subnet.
Visual: Two switches appear on the hub-to-spoke peering line: allow gateway transit and use remote gateways. On-premises routes flow to the spoke.
Narration: The spoke doesn't build a gateway. It uses the hub's gateway through peering.
Visual: The timeline scrolls from 2025 to 2026, and the non-AZ gateway icons turn grey one by one while the AZ icons light up.
Narration: Non-AZ gateway SKUs have already been retired. New gateways always use AZ SKUs.
Module 5 · Private Link and Private DNS: centralized DNS zones and policy-driven auto-registration
- Explain the DNS mechanics of a private endpoint: public name →
privatelinkCNAME → A record in a private DNS zone. - Design following the ALZ pattern: keep the
privatelink.*zones centralized in the connectivity subscription, link them only to the hub (or a shared services VNet), and point spoke DNS at the DNS Private Resolver inbound endpoint. - Understand how the
corppolicies Deploy-Private-DNS-Zones (DINE), Audit-PeDnsZones (Audit), and Deny-Public-Endpoints work together, and what permissions the managed identity needs. - Use the Resolver's inbound and outbound endpoints and forwarding ruleset to enable two-way resolution between on-premises and Azure.
What: private endpoints and their DNS
A private endpoint is a NIC placed in your subnet whose private IP maps to a sub-resource of a PaaS resource (such as the blob of a storage account). After it is created, Azure adds a CNAME in public DNS for the resource: stmyapp.blob.core.windows.net → stmyapp.privatelink.blob.core.windows.net.
- If a query comes from a VNet that can see the
privatelink.blob.core.windows.netprivate DNS zone, Azure DNS (168.63.129.16) finds the A recordstmyapp → 10.1.2.5in the private zone. - Otherwise, resolution continues in public DNS and returns a public IP. But resources in corp have public access disabled, so the connection is refused (403 or timeout).
A records are maintained by the private DNS zone group (privateDnsZoneGroup) on the private endpoint. The zone group points to a specific private DNS zone, and the platform automatically writes and deletes A records in that zone.
Why: why centralize
- If each landing zone creates its own copy of the same
privatelink.blob.core.windows.netzone, cross-VNet and on-premises clients see only one of the copies. Resolution results then depend on which zone is linked to which VNet, and that inevitably leads to errors. - When centralized: one zone per service, linked only to the hub. All spokes and on-premises resolve through the hub's Resolver, and the results are consistent.
How 1: ALZ's three corp policies
| Assignment name | Effect | What it does |
|---|---|---|
Deploy-Private-DNS-Zones | DeployIfNotExists | Policy set “Configure Azure PaaS services to use private DNS zones” (59 definitions in library 2026.11.0). When a private endpoint with a given groupId appears under corp without a zone group, it deploys privateDnsZoneGroups using the system-assigned managed identity, pointing to the centralized zone in the connectivity subscription. The parameters dnsZoneSubscriptionId, dnsZoneResourceGroupName, and dnsZoneRegion determine where the zone is. |
Audit-PeDnsZones | Audit | Audits privatelink.* zones created inside landing zones (a list of 64 zone names). |
Deny-Public-Endpoints | Mostly Deny | Policy set Deny-PublicPaaSEndpoints: PaaS services must disable public network access. |
Permissions: the built-in DINE definitions (such as “Configure a private DNS Zone ID for blob groupID”) have roleDefinitionIds that set Network Contributor. The assignment is on corp, but the zone to write to is in the connectivity subscription, so the managed identity also needs Network Contributor on the resource group of the private DNS zone (or on the connectivity subscription). The ALZ IaC implementation makes this cross-scope role assignment automatically; it's easy to miss when deploying by hand.
Scope: the policy set only covers the services and groupIds in its list. For example, the zone name list in library 2026.11.0 does not include privatelink.database.windows.net for Azure SQL Database, so such services need their own policy or an explicit zone group in IaC.
How 2: DNS Private Resolver
- Inbound endpoint: a private IP in the hub (
10.0.2.4in this hour). On-premises DNS conditional forwarders and spoke custom DNS both point to it. It queries Azure DNS from the hub VNet's perspective, so it can see private zones linked to the hub. - Outbound endpoint + forwarding ruleset: forwards on-premises domains such as
corp.contoso.com.to the on-premises DNS (192.168.10.4). The ruleset is linked to the VNets that need it. - Limits: subnet
/28–/24, can only be delegated toMicrosoft.Network/dnsResolvers; about 10,000 QPS per endpoint; a ruleset can hold up to 1,000 rules and 500 VNet links; one Resolver can reference only one VNet in its region; IPv6 subnets are not supported, cross-tenant ruleset links are not supported, and it is incompatible with Azure Lighthouse.
When: how to set spoke DNS
- Recommended: spoke VNet DNS server = the Resolver inbound IP (or the DNS proxy IP of Firewall Standard / Premium, where the firewall forwards to the Resolver or Azure DNS, so FQDNs in network rules are reliable).
- You can also link the centralized zones to every spoke, but the number of links grows with each landing zone, and you still need the Resolver service locally.
- Virtual WAN: private zones can't be linked to a virtual hub. Link them to a shared services VNet and deploy the Resolver there.
- “On-premises DNS should conditionally forward
privatelink.blob.core.windows.net.” It should forward the public zone nameblob.core.windows.net, because clients query the public name, and the CNAME is what points to privatelink. - “It's fine to skip DNS integration when creating a private endpoint.” Under corp, DINE adds the zone group. Outside corp, there is no record, so resolution returns the public IP.
- “DINE can fix existing private endpoints immediately.” Existing resources need a remediation task.
- “It's faster for the app team to create a privatelink zone in their own subscription.” This causes split-brain resolution, and Audit-PeDnsZones will flag it as non-compliant.
Centralized private DNS and resolution path
DNS resolution chain animation
Select a client and a configuration, then step through one resolution of stmyapp.blob.core.windows.net: who sends the query, which resolver answers, how the CNAME leads the query to the privatelink zone, and what you get when the configuration is wrong.
Centralized private DNS zone (connectivity subscription)
az account set -s $SUB_CONN az network private-dns zone create -g $RG_DNS -n privatelink.blob.core.windows.net az network private-dns link vnet create -g $RG_DNS -z privatelink.blob.core.windows.net \ -n link-vnet-hub-cc -v $HUB_ID -e false # -e: do not auto-register VM records
DNS Private Resolver
az extension add -n dns-resolver --upgrade
az network vnet subnet create -g $RG_CONN --vnet-name $HUB -n snet-dnspr-in --address-prefixes 10.0.2.0/28 --delegations Microsoft.Network/dnsResolvers
az network vnet subnet create -g $RG_CONN --vnet-name $HUB -n snet-dnspr-out --address-prefixes 10.0.2.16/28 --delegations Microsoft.Network/dnsResolvers
IN_SUBNET=$(az network vnet subnet show -g $RG_CONN --vnet-name $HUB -n snet-dnspr-in --query id -o tsv)
OUT_SUBNET=$(az network vnet subnet show -g $RG_CONN --vnet-name $HUB -n snet-dnspr-out --query id -o tsv)
az dns-resolver create -g $RG_CONN -n dnspr-hub-cc -l $LOC --id $HUB_ID
az dns-resolver inbound-endpoint create -g $RG_CONN --dns-resolver-name dnspr-hub-cc -n in-hub-cc -l $LOC \
--ip-configurations "[{private-ip-address:10.0.2.4,private-ip-allocation-method:Static,id:$IN_SUBNET}]"
az dns-resolver outbound-endpoint create -g $RG_CONN --dns-resolver-name dnspr-hub-cc -n out-hub-cc -l $LOC --id $OUT_SUBNET
OUT_EP=$(az dns-resolver outbound-endpoint show -g $RG_CONN --dns-resolver-name dnspr-hub-cc -n out-hub-cc --query id -o tsv)
az dns-resolver forwarding-ruleset create -g $RG_CONN -n dnsfrs-hub-cc -l $LOC --outbound-endpoints "[{id:$OUT_EP}]"
az dns-resolver forwarding-rule create -g $RG_CONN --ruleset-name dnsfrs-hub-cc -n corp-contoso \
--domain-name "corp.contoso.com." --forwarding-rule-state Enabled \
--target-dns-servers "[{ip-address:192.168.10.4,port:53}]"
az dns-resolver vnet-link create -g $RG_CONN --ruleset-name dnsfrs-hub-cc -n link-hub --id $HUB_ID
# Use the Resolver inbound IP as the spoke DNS (VMs already running must restart or renew DHCP to pick it up)
az account set -s $SUB_APP
az network vnet update -g $RG_APP -n $SPOKE --dns-servers 10.0.2.4
Private endpoint (corp application subscription)
ST=stmyapp$RANDOM az storage account create -g $RG_APP -n $ST -l $LOC --sku Standard_LRS \ --public-network-access Disabled --allow-blob-public-access false --min-tls-version TLS1_2 --https-only true ST_ID=$(az storage account show -g $RG_APP -n $ST --query id -o tsv) az network private-endpoint create -g $RG_APP -n pe-$ST-blob -l $LOC \ --vnet-name $SPOKE --subnet snet-pe --private-connection-resource-id $ST_ID \ --group-id blob --connection-name plsc-$ST-blob # Don't create the zone group by hand: wait for the DINE on corp to deploy it, then check a few minutes later az network private-endpoint dns-zone-group list -g $RG_APP --endpoint-name pe-$ST-blob -o table
Name ProvisioningState ---------------------------------- ------------------- deployedByPolicy Succeeded
Verify and fix existing resources
az vm run-command invoke -g $RG_APP -n vm-myapp-test --command-id RunShellScript \
--scripts "nslookup $ST.blob.core.windows.net"
az policy state list --management-group corp \
--filter "policyAssignmentName eq 'Deploy-Private-DNS-Zones' and complianceState eq 'NonCompliant'" \
--query "[].{res:resourceId,ref:policyDefinitionReferenceId}" -o table
az policy remediation create -n rem-pe-blob --management-group corp \
--policy-assignment /providers/Microsoft.Management/managementGroups/corp/providers/Microsoft.Authorization/policyAssignments/Deploy-Private-DNS-Zones \
--definition-reference-id DINE-Private-DNS-Azure-Storage-Blob --resource-discovery-mode ReEvaluateCompliance
Server: 127.0.0.53 Non-authoritative answer: stmyapp24817.blob.core.windows.net canonical name = stmyapp24817.privatelink.blob.core.windows.net. Name: stmyapp24817.privatelink.blob.core.windows.net Address: 10.1.2.5
Lab 5: private endpoint + policy auto-registration + resolution check (about 20 minutes; the Resolver is billed hourly per endpoint, so delete it when you're done)
10.0.2.4, then restart the test VM: az vm restart -g $RG_APP -n vm-myapp-test. If you don't create a Resolver, link the private zone to the spoke VNet instead.az policy assignment show --scope /providers/Microsoft.Management/managementGroups/corp -n Deploy-Private-DNS-Zones \
--query "{id:identity.principalId,sub:parameters.dnsZoneSubscriptionId.value,rg:parameters.dnsZoneResourceGroupName.value}"
az role assignment list --assignee <principalId> --all -o table
Confirm the managed identity has Network Contributor on rg-alz-dns-cc (or the connectivity subscription). If there is no ALZ deployment, skip to step 4 and create the zone group by hand: az network private-endpoint dns-zone-group create -g $RG_APP --endpoint-name pe-$ST-blob -n default --private-dns-zone <zone-id> --zone-name blob.--public-network-access Disabled, and watch Deny-Public-Endpoints block it. Then create it correctly with the command.nslookup returns 10.1.2.5. You can see the A record in the private zone: az network private-dns record-set a list -g $RG_DNS -z privatelink.blob.core.windows.net -o table.az dns-resolver delete -g $RG_CONN -n dnspr-hub-cc (first delete the ruleset links and rulesets, then the outbound and inbound endpoints). Restore the spoke DNS to default: az network vnet update -g $RG_APP -n $SPOKE --dns-servers "".Case 1: half the apps resolve to a public IP
Problem: Early on, each team created its own privatelink.vaultcore.azure.net and linked it to its own VNet. On-premises DNS could only forward to one of them, so half the teams' Key Vaults resolved to a public IP from on-premises and were refused. Fix: Migrate to a centralized zone: export the A records from each team's zone and recreate them in the centralized zone (or delete the zone group on the private endpoint so DINE redeploys it), then delete the scattered zones. Use Audit-PeDnsZones to find leftovers.
Case 2: DINE stays non-compliant and the remediation task fails
Problem: The remediation task reports AuthorizationFailed. Cause: When ALZ was deployed by hand, the managed identity was given its role only at the corp scope, but the private zone is in the connectivity subscription. Fix: Grant Network Contributor to the assigned managed identity on rg-alz-dns-cc, then rerun the remediation task.
Case 3: regional zone names for a private AKS cluster
Problem: A private AKS cluster uses regional zones such as privatelink.canadacentral.azmk8s.io. The DINE parameter dnsZoneRegion was left at its default changeme, so the zone group points to a zone that doesn't exist. Fix: Set the correct region in the assignment parameters, and create the matching zone for each region.
Common errors and fixes
nslookup returns a public IP (Non-authoritative answer ... 20.x.x.x)
Check in this order: ① which DNS server the client uses (VNet DNS setting, and whether the VM was restarted); ② whether the private zone is linked to the VNet where that DNS server lives (hub); ③ whether the private endpoint has a zone group, and whether the zone has an A record; ④ whether the zone name forwarded from on-premises is the public zone name.
(RequestDisallowedByPolicy) ... Deny-Public-Endpoints / Public network access should be disabled for PaaS services
PaaS in corp must have public access disabled. Fix: Add --public-network-access Disabled when creating it, and access it through the private endpoint. Workloads that really need public access belong in an online landing zone.
The private endpoint is created successfully, but it still has no zone group after several dozen minutes
Cause: it isn't under corp; the service or groupId isn't in the policy set's list; the zone ID in the assignment parameters is still a placeholder; or the managed identity lacks permission. Diagnosis: az policy state list --resource <pe-id>, and look for failed “deployIfNotExists” deployment records in the activity log.
Subnet ... is delegated to another service / Resolver endpoint creation failed
The Resolver subnet must be empty, sized /28–/24, and delegated to Microsoft.Network/dnsResolvers. Inbound and outbound endpoints can't share a subnet.
On-premises can resolve Azure names, but Azure can't resolve on-premises domain names
The outbound direction is missing: you need an outbound endpoint and a forwarding ruleset, and the ruleset must be linked to the VNet that uses it (the hub; when a spoke's DNS points to the inbound endpoint, inbound queries use the hub's ruleset).
1. List the VNets that the privatelink.blob.core.windows.net zone is linked to.
az network private-dns link vnet list -g rg-alz-dns-cc -z privatelink.blob.core.windows.net --query "[].{name:name,vnet:virtualNetwork.id,reg:registrationEnabled}" -o table2. Find all private endpoints in corp that have no zone group (by DINE compliance state).
az policy state list --management-group corp --filter "policyAssignmentName eq 'Deploy-Private-DNS-Zones' and complianceState eq 'NonCompliant'" --query "[].resourceId" -o tsv
Your organization uses Virtual WAN and also has on-premises AD DNS. Design a DNS plan for Private Link, and explain what parameters the ALZ policies need.
In the connectivity subscription, create a shared-services spoke (connected to the Virtual WAN hub) and deploy a DNS Private Resolver with inbound and outbound endpoints. Place all privatelink.* zones in rg-alz-dns-cc and link them only to the shared-services spoke. Set the DNS server on each Landing Zone spoke to the Resolver's inbound IP. On on-premises AD DNS, add conditional forwarders for public zone names (such as blob.core.windows.net and vaultcore.azure.net) that point to the inbound IP. The outbound ruleset forwards on-premises domains to AD DNS and is linked to the shared-services spoke. Point dnsZoneSubscriptionId, dnsZoneResourceGroupName, and dnsZoneRegion in Deploy-Private-DNS-Zones at these zones. The managed identity needs Network Contributor on that resource group. For services not in the inventory, add policy or IaC yourself.
Verified teaching videos
Official documentation
- CAF: Private Link and DNS integration at scale
- Private endpoint DNS zone values
- Azure DNS Private Resolver overview
- ALZ Library: corp policy assignments
Video storyboard (about 90 seconds)
Visual: The client queries stmyapp.blob.core.windows.net. Public DNS returns a CNAME that points to privatelink.
Narration: After a private endpoint is created, the public name gets one more alias that points to privatelink.
Visual: The private DNS zone in the hub lights up, and the A record 10.1.2.5 is returned to the client. On another path, a VNet with no linked zone gets a public IP and is refused.
Narration: If the private zone is visible, you get a private address. If it isn't, you get a public address.
Visual: A private endpoint newly created in the corp subscription is scanned by a policy icon, and a zone-group link grows automatically to the central zone.
Narration: In the corp management group, ALZ's DINE policy registers the DNS record for private endpoints automatically.
Visual: Conditional forwarding on on-premises DNS points to the Resolver's inbound IP.
Narration: On-premises forwarding covers public zone names, and the target is the Resolver's inbound endpoint.
Module 6 · Inbound protection: DDoS, WAF, Application Gateway, and Front Door
- Tell apart the free DDoS infrastructure protection built into Azure, DDoS IP Protection, and DDoS Network Protection. Know what ALZ's Enable-DDoS-VNET (Modify) does.
- Choose between Application Gateway WAF v2 (regional, L7 load balancing) and Front Door Premium (global edge, WAF, Private Link origins), or use both together.
- Understand why Azure Firewall can't replace WAF (it doesn't apply application rules to inbound connections), and the symmetric routing issue when inbound traffic is combined with the hub firewall.
What: three layers of inbound protection
| Layer | Service | What it protects against |
|---|---|---|
| L3 / L4 volumetric attacks | DDoS infrastructure protection (free, on by default); DDoS IP Protection; DDoS Network Protection | SYN floods, UDP amplification, etc. |
| L7 application attacks | WAF (Application Gateway WAF v2 or Front Door) | SQL injection, XSS, malicious bots, HTTP floods (rate limiting) |
| Network access control | NSGs, Azure Firewall DNAT, AVNM security admin rules | Non-web protocols, exposed management ports |
Two paid DDoS tiers
| DDoS IP Protection | DDoS Network Protection | |
|---|---|---|
| Billing | Per protected public IP | Per plan (covers 100 public IPs; extra IPs billed separately) |
| Cross-subscription | Yes (within the tenant) | Yes: one plan can protect VNets across multiple subscriptions in the tenant |
| DDoS Rapid Response (DRR), cost protection, WAF discount | Not included | Included |
| Basic public IP | Not supported | Supported |
| Unsupported scenarios | Multi-tenant PaaS, Virtual WAN; public IPs attached to a Standard NAT gateway (support for StandardV2 NAT gateway is in preview) | |
How ALZ does it: deploy one DDoS Network Protection plan in the connectivity subscription, and at connectivity and landingzones assign Enable-DDoS-VNET (“Virtual networks should be protected by Azure DDoS Network Protection”, effect Modify, parameter ddosPlan). New or updated VNets are automatically associated with this plan. The plan is billed as a fixed monthly charge in the thousands of dollars, so small organizations often choose not to deploy it. In that case, turn off the assignment in IaC or switch to IP Protection (the exact switch depends on the configuration of the Accelerator version you use).
Application Gateway and Front Door
| Application Gateway WAF v2 | Front Door Standard / Premium | |
|---|---|---|
| Scope | Regional, deployed in a VNet subnet | Global, Microsoft edge nodes (100+ cities) |
| WAF | Microsoft Default Rule Set (DRS), custom rules, bot rules | Standard: custom rules only; Premium: managed rule sets, bot protection |
| To origin | Private IP (same VNet or peered VNet) | Public, or Private Link origin on Premium (the origin can have public access fully disabled) |
| Typical use | Single-region app that needs an internal (private frontend) entry point | Multi-region, global users, cache acceleration, edge WAF |
| Status | v1 retired on 2026-04-28 per the official announcement; new deployments use v2 | Front Door (classic) can't be created from 2025-03-31 and retires 2027-03-31 |
How: common combinations
- Front Door Premium → Private Link → App Service / internal load balancer: the origin isn't exposed to the public internet, and WAF runs at the edge.
- Front Door → Application Gateway WAF v2 → backend: global acceleration plus regional WAF. App Gateway allows only Front Door traffic (service tag
AzureFrontDoor.Backendplus anX-Azure-FDIDheader check). - Application Gateway (spoke or hub) + Azure Firewall: WAF inspects L7 first, then the firewall inspects east-west traffic. Pay close attention to the UDRs on the App Gateway subnet and return-path symmetry. The App Gateway subnet doesn't support some
0.0.0.0/0 → firewallconfigurations, so design according to the official “Firewall and Application Gateway” guide. - Non-web protocols: use Azure Firewall DNAT, or a public load balancer with DDoS protection. Azure Firewall doesn't apply application rules to inbound connections, so use WAF for inbound HTTP / HTTPS.
When: which Landing Zone to use
- online: applications directly facing the internet. ALZ adds no extra assignments on the
onlinemanagement group by default, but it inherits policies such as Audit-AppGW-WAF fromlandingzones. - corp: corp blocks NICs from having public IPs and requires PaaS services to disable public network access. To publish externally, use Front Door Premium + Private Link, or place the entry point in online / connectivity.
- “Azure Firewall Premium means you don't need WAF”: firewall application rules apply only to outbound traffic. Inbound HTTP protection relies on WAF.
- “DDoS Network Protection automatically protects Front Door”: Front Door has built-in platform-level L3 / L4 DDoS protection. A DDoS plan protects public IPs in VNets.
- “Set WAF to Prevention as soon as it goes live”: first observe false positives in Detection mode, and switch to Prevention only after tuning the exclusions.
- “Front Door Standard includes managed rule sets”: managed rule sets and bot protection are available only on Premium.
Inbound reference architecture
Interactive simulator: inbound path and attacks
Choose an entry architecture, protection settings, and attack type. The simulator shows layer by layer where the attack is handled (or gets through). This is a teaching model of each service's role and does not represent actual detection rates.
WAF policy (Application Gateway; create the policy only, not the gateway)
az account set -s $SUB_APP
az network application-gateway waf-policy create -g $RG_APP -n wafp-myapp-cc -l $LOC \
--type Microsoft_DefaultRuleSet --version 2.1
az network application-gateway waf-policy policy-setting update -g $RG_APP --policy-name wafp-myapp-cc \
--mode Detection --state Enabled --request-body-check true
# Custom rule: limit each client IP to 300 requests per minute
az network application-gateway waf-policy custom-rule create -g $RG_APP --policy-name wafp-myapp-cc \
-n ratelimit-ip --priority 10 --rule-type RateLimitRule --rate-limit-duration OneMin \
--rate-limit-threshold 300 --group-by-user-session "[{group-by-variables:[{variable-name:ClientAddr}]}]" --action Block
az network application-gateway waf-policy show -g $RG_APP -n wafp-myapp-cc \
--query "{mode:policySettings.mode,rules:managedRules.managedRuleSets[].{t:ruleSetType,v:ruleSetVersion}}"
{ "mode": "Detection", "rules": [ { "t": "Microsoft_DefaultRuleSet", "v": "2.1" } ] }
Front Door Premium (read-only reference; has a monthly base fee)
az afd profile create -g $RG_APP --profile-name afd-myapp --sku Premium_AzureFrontDoor az network front-door waf-policy create -g $RG_APP -n wafafdmyapp --sku Premium_AzureFrontDoor --mode Prevention az network front-door waf-policy managed-rules add -g $RG_APP --policy-name wafafdmyapp \ --type Microsoft_DefaultRuleSet --version 2.1 --action Block # Origin uses Private Link: az afd origin create ... --enable-private-link true --private-link-resource <id> --private-link-location canadacentral --private-link-request-message "afd"
DDoS (read-only reference; fixed monthly fee)
# Network Protection: the plan lives in the connectivity subscription, and VNets are associated with the plan
az network ddos-protection create -g $RG_CONN -n ddos-alz-cc -l $LOC
az network vnet update -g $RG_APP -n $SPOKE --ddos-protection true --ddos-protection-plan <plan-id>
# IP Protection: enable per public IP
az network public-ip update -g $RG_APP -n pip-agw-myapp-cc --ddos-protection-mode Enabled
# View the ALZ Enable-DDoS-VNET assignment
az policy assignment show --scope /providers/Microsoft.Management/managementGroups/landingzones -n Enable-DDoS-VNET \
--query "{effect:parameters.effect.value,plan:parameters.ddosPlan.value,mode:enforcementMode}"
Lab 6: WAF policy and Audit-AppGW-WAF (about 10 minutes, nearly free)
az network application-gateway waf-policy managed-rule rule-set list --query "[?ruleSetType=='Microsoft_DefaultRuleSet']" -o table, and find the SQL injection and XSS rule groups.az policy state summarize --management-group landingzones \ --filter "policyAssignmentName eq 'Audit-AppGW-WAF'" --query "value[0].results"
curl "https://<agw-ip>/?id=1%20OR%201=1", then delete the gateway and public IP right away.az network application-gateway waf-policy delete -g $RG_APP -n wafp-myapp-cc (keep it if the Capstone lab needs it; a standalone policy doesn't incur gateway charges).Case 1: HTTP flood during an e-commerce promotion
Problem: many high-frequency requests from single IPs overwhelm the backend. Approach: add a per-client-IP rate limiting rule to the Front Door Premium WAF and enable bot protection; change the origin to Private Link so it accepts only Front Door traffic. Limitation: rate limiting is approximate counting, so set the threshold based on a real traffic baseline.
Case 2: WAF false positive blocks legitimate uploads
Problem: the service went live directly in Prevention mode, and multipart requests to the file upload API matched the SQL injection rule. Approach: switch back to Detection, analyze the WAF logs (rule ID, matched variable), add an exclusion for that path, and then switch back to Prevention.
Case 3: DDoS plan cost dispute
Problem: a small organization's Landing Zone has only 3 public IPs, but it deployed a Network Protection plan. Approach: switch to IP Protection (billed per IP), turn off the Enable-DDoS-VNET assignment in IaC, and keep the platform protection built into Front Door. Trade-off: you lose DRR, cost protection, and the WAF discount.
Common errors and fixes
App Gateway backend health shows Unhealthy, but WAF itself is working
Check: whether the backend NSG allows the App Gateway subnet; whether the App Gateway subnet's NSG allows ports 65200–65535 from the GatewayManager service tag; whether the backend certificate / hostname matches; whether a UDR sends return traffic to the firewall, causing asymmetric routing. az network application-gateway show-backend-health.
Front Door returns 403, and WAF logs show action=Block
A managed rule or custom rule matched. Diagnose: in AzureDiagnostics / AGWFirewallLogs or FrontDoorWebApplicationFirewallLog, look up the rule ID by trackingReference. Fix: correct the request or add a precise exclusion.
Front Door Private Link origin stays Pending
You need to approve the private endpoint connection on the origin resource (such as the Private Link service on App Service or an internal load balancer). az network private-endpoint-connection approve.
After a new VNet is created, a DDoS plan is associated automatically (or an error occurs because of a placeholder plan)
This is the behavior of Enable-DDoS-VNET (Modify). If you don't need it, disable the assignment in IaC. The plan ID in the parameter must refer to a plan that actually exists.
(RequestDisallowedByPolicy) Deny-Public-IP-On-NIC: attaching a public IP to a VM NIC in corp
corp blocks public IPs on NICs. When you need a public entry point, use an online Landing Zone or publish through Front Door / App Gateway.
1. Switch the WAF policy from Detection to Prevention.
az network application-gateway waf-policy policy-setting update -g rg-lz-myapp-cc --policy-name wafp-myapp-cc --mode Prevention --state Enabled
2. Check whether DDoS protection is enabled on a VNet, and which plan it is associated with.
az network vnet show -g rg-lz-myapp-cc -n vnet-spoke-myapp-cc --query "{ddos:enableDdosProtection,plan:ddosProtectionPlan.id}"A corp application for users nationwide (App Service, public access disabled) needs to be exposed externally. The security team requires that the edge WAF be in place and the origin not be directly reachable. How do you implement this in ALZ?
Use Front Door Premium: a WAF policy (DRS managed rules + bot protection + rate limiting, Detection first, then Prevention). Configure the origin as a Private Link connection to App Service, and approve the private endpoint connection on App Service. Keep public access disabled on App Service to satisfy corp's Deny-Public-Endpoints. The Front Door resource can go in the application subscription or a dedicated edge subscription. Store the custom domain certificate in Key Vault (accessed via managed identity). You don't need a public IP in corp, and you don't need a DDoS plan to cover Front Door, because it has built-in platform-level protection.
Verified teaching videos
Official documentation
- DDoS Protection tier comparison
- Front Door vs. CDN tier comparison (including classic retirement)
- WAF on Application Gateway
- Firewall and Application Gateway for virtual networks
Video storyboard (about 80 seconds)
Visual: a flood of small packets hits the public IP and is absorbed by a blue shield labeled DDoS.
Narration: Volumetric attacks are absorbed at the network layer by DDoS protection.
Visual: A request containing OR 1=1 reaches the Front Door edge and is blocked by WAF. Normal requests reach the origin through Private Link.
Narration: Application-layer attacks are handled by WAF. Front Door Premium can also connect to the origin through Private Link, so the origin is no longer exposed to the public internet.
Visual: A firewall icon points only in the outbound direction, while inbound HTTP arrows are routed to WAF.
Narration: The firewall handles outbound and east-west traffic. Inbound web traffic must be inspected by WAF.
Module 7 · Network policy for corp and online Landing Zones
- List the network-related policy assignments on
landingzones, and the 5 extra assignments oncorp. Explain the effect of each (Deny / Audit / Modify / DINE). - Based on connectivity needs, place a workload in corp, online, or local, and know what moving a subscription between them means.
- Handle exceptions with compliance state, exemptions, and
DoNotEnforce, rather than deleting assignments.
What: positioning of the two archetypes
corp | online | |
|---|---|---|
| Connectivity | Needs private connectivity with on-premises / other Landing Zones; goes through the hub | Directly faces the internet; may skip the hub (or connect to the hub for outbound only) |
| Public exposure | Prohibited: NICs can't have public IPs, and PaaS must disable public access | Allowed, but needs WAF / DDoS / NSG protection |
| DNS | Private endpoints are registered automatically to the central zones by DINE | Owned by the application team (it can also use the central zones) |
| Hybrid connectivity resources | Self-built VPN / ER / vWAN prohibited (Deny-HybridNetworking) | No such restriction (but the platform should still provide it) |
| Extra assignments | 5 | 0 (only inherits landingzones and alz) |
Network-related landingzones assignments inherited by both
| Assignment name | Effect | Description |
|---|---|---|
Deny-IP-forwarding | Deny | NICs can't enable IP forwarding (NVAs belong in connectivity) |
Deny-MgmtPorts-Internet | Deny | NSGs can't allow management ports from the Internet (such as 22, 3389) |
Deny-Subnet-Without-Nsg | Deny | Subnets must be associated with an NSG (special subnets excepted) |
Enable-DDoS-VNET | Modify | VNets automatically associate with a DDoS plan |
Audit-AppGW-WAF | Audit | Application Gateway should have WAF enabled |
Enforce-Subnet-Private | Audit (enforcementMode: DoNotEnforce) | Subnets should be private (default outbound access disabled) |
Enforce-GR-Network0 | Policy set (DoNotEnforce) | Recommended guardrails for network services; reports only by default, no enforcement |
Enforce-TLS-SSL-Q225, Deny-Storage-http | Mix of Deny / DINE / Append | Transport encryption requirement (not purely network, but often raised in network reviews) |
corp's 5 extra
| Assignment name | Effect | Description |
|---|---|---|
Deny-Public-IP-On-NIC | Deny | NICs can't be associated with public IPs |
Deny-Public-Endpoints | Mostly Deny | PaaS public access must be disabled (policy set Deny-PublicPaaSEndpoints) |
Deny-HybridNetworking | Deny | Prohibits 9 types of resources, such as vWAN / ER / VPN gateways |
Deploy-Private-DNS-Zones | DeployIfNotExists | Private endpoints are registered automatically to the central DNS zones |
Audit-PeDnsZones | Audit | Audit self-built privatelink zones |
Source: archetype and policy_assignments definitions in the Azure Landing Zones Library platform/alz/2026.11.0 (consistent with the shared facts in hour 1). The identity management group also has Deny-Public-IP, Deny-MgmtPorts-Internet, and Deny-Subnet-Without-Nsg.
How: handling exceptions
- Exemption: exempt a specific resource, resource group, or subscription from an assignment (or from some definitions in a policy set). Category Waiver or Mitigated, with an expiration date set. Best suited to individual cases that have compensating controls.
- DoNotEnforce: the assignment is still evaluated and still reports noncompliance, but Deny doesn't block and DINE doesn't deploy automatically. Suited to an observation period before go-live.
- Move to a different management group: if the application is inherently internet-facing, the right move is to place it in
online, not to pile up exemptions in corp. - Don't modify or delete ALZ assignments directly. They are overwritten when you upgrade the ALZ library or rerun IaC, so express changes as parameter overrides in IaC or as policy exemptions.
When: corp or online
- Internal systems, systems that need access to on-premises databases, and systems that use private endpoints: corp.
- Public websites, external APIs, mobile backends, with no need to reach on-premises: online.
- Both: split into two Landing Zones (frontend in online, backend in corp), or publish through Front Door Premium + Private Link from corp.
- Moving a subscription (corp ↔ online) changes the effective policies immediately. First evaluate in the target management group using a what-if approach with
az policy state(list the resources that would become noncompliant), then move it.
- “Online has no network policies at all”: it has no extra assignments, but it inherits all assignments from landingzones and the root.
- “Audit policies can be ignored”: they feed into compliance reports and the security score, and reviewers will ask about them.
- “Exemptions can be permanent”: set an expiration date and review them during the review process.
- “Deny policies delete existing noncompliant resources”: Deny only blocks new creation and updates. Existing resources are just marked noncompliant.
Policy inheritance: the same request in corp and online
Interactive evaluator: which policy handles this request?
Select a target management group and a network-related ARM request. The evaluator walks the inheritance chain (alz → landingzones → corp / online), lists the matching ALZ assignments, and shows the result. Data comes from ALZ Library 2026.11.0; policy internal conditions are simplified.
View assignments, effects, and compliance
MG=/providers/Microsoft.Management/managementGroups
az policy assignment list --scope $MG/corp --query "[].{name:name,mode:enforcementMode}" -o table
az policy assignment list --scope $MG/landingzones --query "[?contains(name,'Deny-') || contains(name,'DDoS') || contains(name,'Subnet')].{name:name,mode:enforcementMode}" -o table
# Include inherited assignments: list at subscription scope
az policy assignment list --disable-scope-strict-match --scope /subscriptions/$SUB_APP --query "[].name" -o tsv | sort
Name Mode ------------------------- ------- Audit-PeDnsZones Default Deny-HybridNetworking Default Deny-Public-Endpoints Default Deny-Public-IP-On-NIC Default Deploy-Private-DNS-Zones Default
# Summary of noncompliant network resources in corp
az policy state summarize --management-group corp --query "value[0].policyAssignments[].{a:policyAssignmentId,nc:results.nonCompliantResources}" -o table
# Before moving a subscription to online, check which resources it has under the corp-only assignment
az policy state list --subscription $SUB_APP --filter "policyAssignmentName eq 'Deny-Public-Endpoints'" --query "[].{r:resourceId,s:complianceState}" -o table
Exemption (with expiration date)
az policy exemption create -n exm-legacy-ftp-pip \ --scope /subscriptions/$SUB_APP/resourceGroups/rg-lz-legacy-cc \ --policy-assignment $MG/corp/providers/Microsoft.Authorization/policyAssignments/Deny-Public-IP-On-NIC \ --exemption-category Waiver --expires-on 2027-01-31T00:00:00Z \ --description "Legacy FTP gateway; migrate to online LZ by 2027-01 (ticket NET-1234)" az policy exemption list --scope /subscriptions/$SUB_APP -o table
Move subscription
az account management-group subscription add --name online --subscription $SUB_APP
Lab 7: trigger 4 outcomes in corp (about 15 minutes, free)
az account set -s $SUB_APP az network public-ip create -g $RG_APP -n pip-test -l $LOC --sku Standard az network nic ip-config update -g $RG_APP --nic-name vm-myapp-testVMNic -n ipconfigvm-myapp-test --public-ip-address pip-test
(RequestDisallowedByPolicy) Resource 'vm-myapp-testVMNic' was disallowed by policy. Policy identifiers: '[{"policyAssignment":{"name":"Deny network interfaces having a public IP associated","id":"/providers/Microsoft.Management/managementGroups/corp/providers/Microsoft.Authorization/policyAssignments/Deny-Public-IP-On-NIC"}, ...}]'
Note: corp only blocks NICs from being associated with public IPs. Creating a standalone public IP resource is not denied by this assignment (the Deny-Public-IP in the identity management group does that). Delete the test public IP.az network nsg rule create -g $RG_APP --nsg-name nsg-snet-app-cc -n allow-rdp --priority 100 --access Allow --protocol Tcp --direction Inbound --source-address-prefixes Internet --destination-port-ranges 3389 should be denied by Deny-MgmtPorts-Internet.privatelink.blob.core.windows.net, wait for evaluation (or run az policy state trigger-scan -g $RG_APP), confirm that Audit-PeDnsZones shows NonCompliant, then delete the zone.Case 1: corp has 40 exemptions piled up
Problem: an externally facing marketing website was placed in corp, and extensive exemptions were requested for a public IP, public storage, and self-built DNS. The audit couldn't explain them. Approach: create a new online Landing Zone and migrate the frontend. Keep the backend API in corp and expose it externally through Front Door Premium + Private Link. Exemptions cleared.
Case 2: private endpoint DNS resolution fails after moving a subscription from corp to online
Problem: after the move, newly created private endpoints no longer register DNS automatically (online has no Deploy-Private-DNS-Zones). Approach: explicitly create the zone group in the IaC template for online, or assign the same policy set in online as an organization-specific extension.
Case 3: NVA team blocked by Deny-IP-forwarding
Problem: the application team needs to deploy a third-party WAF virtual appliance in a spoke, which requires IP forwarding. Approach: an NVA belongs to platform networking, so move it to the connectivity subscription (not constrained by landingzones assignments) and have the platform team operate it; or use a managed service (App Gateway / Front Door WAF).
Common errors and fixes
(RequestDisallowedByPolicy) ... Deny-Subnet-Without-Nsg
When creating a subnet, specify --network-security-group at the same time. In IaC, define the NSG in the subnet definition, rather than creating the subnet first and associating the NSG later (the intermediate state gets rejected).
(RequestDisallowedByPolicy) ... Deny-MgmtPorts-Internet
Don't open management ports to the Internet. Use Azure Bastion, just-in-time access, or VPN instead, and use a specific private source range.
After a subscription is moved, a batch of resources suddenly shows as noncompliant
This is expected: the new management group's assignments start evaluating existing resources. Deny doesn't delete them, but their next update will be rejected. Remediate them according to the inventory, or request an exemption with an expiration date.
Still rejected after creating an exemption
Check: whether the exemption's scope covers the requested resource; whether the correct assignment ID is exempted (assignments with the same name may exist in multiple management groups); whether --policy-definition-reference-ids is needed when assigning a policy set; ARM caching may take a few minutes.
1. List all policy assignments on the corp management group and their enforcement modes.
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/corp --query "[].{name:name,mode:enforcementMode}" -o table2. Exempt Deny-Public-IP-On-NIC for a resource group, with an expiration in 30 days.
az policy exemption create -n exm-pip --scope /subscriptions/<sub>/resourceGroups/<rg> --policy-assignment /providers/Microsoft.Management/managementGroups/corp/providers/Microsoft.Authorization/policyAssignments/Deny-Public-IP-On-NIC --exemption-category Waiver --expires-on $(date -u -d "+30 days" +%Y-%m-%dT%H:%M:%SZ)
An application needs to serve an HTTPS API externally, read a local Oracle database, and use an Azure SQL private endpoint. Should it go in corp or online? How do you satisfy all ALZ policies?
Place it in corp: it needs to reach on-premises through the hub and use a private endpoint. For the external API, don't create a public IP in corp. Instead, publish it through Front Door Premium (Private Link origin, such as a Private Link service on an internal load balancer or App Service), or through an App Gateway in connectivity / online. Disable public access on Azure SQL to satisfy Deny-Public-Endpoints. Note that the DINE list in Library 2026.11.0 doesn't include privatelink.database.windows.net, so create the zone group in IaC or add a policy. The subnet has an NSG and no management ports are open; outbound traffic goes through UDR → firewall.
Verified teaching videos
No verified video was found that specifically explains the difference between corp and online network policies, so a storyboard is provided below.
Official documentation
- ALZ Library: archetype definitions
- CAF: Management groups (corp and online)
- Azure Policy exemption structure
Video storyboard (about 75 seconds)
Visual: Two subscriptions are placed in the corp and online folders. The landingzones layer above sends the same rules down to both.
Narration: corp and online both inherit the network guardrails from landingzones.
Visual: The corp folder gets five extra locks: public IP, public PaaS, hybrid gateway, private DNS, and self-built zone audit. The same “attach a public IP” request is denied in corp and allowed in online.
Narration: corp has five extra assignments that keep applications private.
Visual: An exemption tag with a countdown is attached to a resource group.
Narration: Express exceptions with exemptions that have an expiration date. Applications that truly face the internet belong in online.
Module 8 · Network review and troubleshooting: connectivity and DNS
- Use a review checklist to check the 12 key points of connectivity and Landing Zone networking.
- Use Network Watcher confidently: next hop, IP flow verify, effective routes, effective security rules, connection troubleshoot, and packet capture. Know that VNet flow logs replace NSG flow logs.
- Troubleshoot in the order DNS → routing → filtering → endpoint, and use the interactive troubleshooting tree to locate common faults.
What: network review checklist
| # | Check item | Why | How to check |
|---|---|---|---|
| 1 | Address spaces don't overlap and can be summarized by region | Overlaps prevent peering and routing | IPAM pool utilization; Resource Graph summary of VNet prefixes |
| 2 | All peerings Connected / FullyInSync | One-sided peerings, or address changes that haven't synchronized | az network vnet peering list |
| 3 | Spoke subnets have UDRs pointing to the firewall, and gateway route propagation is disabled (by design) | Prevents bypassing inspection | Effective routes |
| 4 | GatewaySubnet has a return-path UDR, no NSG, and no 0/0 route | Symmetric routing and gateway support | Subnet configuration |
| 5 | Firewall SKU matches throughput; policies have a parent/child hierarchy | Bottlenecks and rule drift | Metrics: Throughput, SNAT port utilization |
| 6 | Gateways are AZ SKUs; no Basic public IPs | Retirement timeline | az network vnet-gateway list |
| 7 | Private DNS zones are centralized and linked only to the hub; no self-built privatelink zones | Resolution consistency | Audit-PeDnsZones compliance |
| 8 | DINE managed identity has permissions on the DNS zone resource group; no long-term noncompliance | Automatic registration fails | az policy state list |
| 9 | Spoke DNS points to the Resolver / firewall DNS proxy; on-premises forwards public zone names | Hybrid resolution | VNet DNS settings, on-premises DNS configuration |
| 10 | Subnets are private (explicit outbound); corp has no public IPs | Security baseline and default outbound changes | Enforce-Subnet-Private audit results |
| 11 | Public entry points have WAF (Prevention) and DDoS protection | L7 / L3-4 protection | Audit-AppGW-WAF, Enable-DDoS-VNET |
| 12 | VNet flow logs and firewall logs go to Log Analytics | Troubleshooting and audit evidence | Diagnostic settings, flow log configuration |
How: the toolbox
| Question | Tool | What the output tells you |
|---|---|---|
| Where does the name resolve? | nslookup / dig / Resolve-DnsName (on the source VM) | DNS server used, CNAME chain, final IP |
| Where do the packets go? | Next hop (show-next-hop), effective routes | Next hop type, IP, active route table |
| Will the NSG block it? | IP flow verify (test-ip-flow), effective security rules, NSG diagnostics | Allow / Deny, and the name of the matching rule |
| Can it get through end to end? | Connection troubleshoot (test-connectivity), Connection Monitor | Hop-by-hop path, latency, failure reason |
| Is it allowed at the policy level? | AVNM Virtual Network Verifier (reachability analysis) | Which Azure configurations (NSGs, security admin rules, routes) block the traffic |
| How the firewall decides | Firewall structured logs (AZFWNetworkRule, AZFWApplicationRule, AZFWDnsQuery) | Matching rule collections and actions |
| Traffic facts | VNet flow logs + Traffic Analytics; packet capture | Actual flows and bytes |
NSG flow logs are on the retirement path (official: new creation is no longer supported, and they retire on 2027-09-30, deleting existing flow log resources). New environments use VNet flow logs.
Why: why the order matters
Many “can't connect” problems are actually resolution to a public IP (Module 5). In that case, checking routes and NSGs gives misleading results. First confirm the IP is correct, then check routing (next hop), then check filtering (NSG → security admin rules → firewall), and finally confirm that the peer service is listening and that the peer NSG allows the traffic.
When: the first step for each common symptom
- “PaaS access returns 403 / times out” →
nslookup. - “Spokes can't reach each other” → next hop (is it None, or does it bypass the firewall?).
- “Outbound doesn't work” → next hop + firewall logs + whether the subnet is private.
- “On-premises to Azure connection drops intermittently” → symmetric routing (next hop in both directions), gateway metrics, and BGP routes.
- “If ping fails, the network is down”: Azure Firewall doesn't allow ICMP by default, and default outbound access doesn't support ICMP either. Test with TCP instead (
nc -zv,curl, connection troubleshoot). - “If the NSG shows Allow, traffic will definitely get through”: you also have security admin rules, the firewall, the peer NSG, and whether the service is listening.
- “Changing the VNet's DNS servers takes effect immediately”: VMs need to restart or renew their DHCP lease.
- “A custom DNS server doesn't need to forward to 168.63.129.16”: without that forwarding, it can't resolve private DNS zones or Azure internal names.
Troubleshooting order
Interactive scorer: run a network review on your environment
Check the items your environment already meets. The scorer weights them by impact (teaching weights) and lists the problems to fix first, with the corresponding modules.
Common Network Watcher commands
# Next hop
az network watcher show-next-hop -g $RG_APP --vm vm-myapp-test --source-ip 10.1.1.4 --dest-ip 10.2.1.4
# IP flow verify (NSG level)
az network watcher test-ip-flow -g $RG_APP --vm vm-myapp-test --direction Outbound --protocol TCP \
--local 10.1.1.4:50000 --remote 10.1.2.5:443
# Effective security rules
az network nic list-effective-nsg -g $RG_APP -n vm-myapp-testVMNic \
--query "value[].effectiveSecurityRules[?access=='Deny'].{n:name,dir:direction,dst:destinationPortRange}" -o json
# End-to-end connectivity test (requires the Network Watcher agent extension on the VM)
az network watcher test-connectivity -g $RG_APP --source-resource vm-myapp-test \
--dest-address $ST.blob.core.windows.net --dest-port 443
{ "access": "Allow", "ruleName": "securityRules/AllowVnetOutBound" }
{
"connectionStatus": "Reachable",
"hops": [
{ "address": "10.1.1.4", "type": "Source" },
{ "address": "10.1.2.5", "type": "PrivateLink" }
],
"avgLatencyInMs": 2
}
DNS and peering checks
az vm run-command invoke -g $RG_APP -n vm-myapp-test --command-id RunShellScript \
--scripts "resolvectl status | grep -A2 'DNS Servers'; nslookup $ST.blob.core.windows.net; nc -zv -w 5 10.2.1.4 5000"
az network vnet show -g $RG_APP -n $SPOKE --query "dhcpOptions.dnsServers"
az network vnet peering list -g $RG_APP --vnet-name $SPOKE --query "[].{n:name,s:peeringState,sync:peeringSyncLevel}" -o table
Resource Graph: tenant-wide network inventory
az graph query -q "resources | where type =~ 'microsoft.network/virtualnetworks' | mv-expand prefix = properties.addressSpace.addressPrefixes | project subscriptionId, name, location, prefix=tostring(prefix) | order by prefix asc" --first 200 -o table az graph query -q "resources | where type =~ 'microsoft.network/virtualnetworkgateways' | project name, location, sku=tostring(properties.sku.name), type=tostring(properties.gatewayType)" -o table
VNet flow logs
az network watcher flow-log create -l $LOC -g $RG_APP -n fl-vnet-spoke-myapp-cc \ --vnet $SPOKE --storage-account <storage-id> \ --traffic-analytics true --workspace <law-alz-mgmt-cc-id> --interval 10
Lab 8: an end-to-end network review (about 15 minutes, free)
nslookup against the storage account (if you cleaned up in Module 5, substitute any privatelink scenario or skip this step), and confirm the resolver and the result.1.1.1.1), spoke 2 (10.2.1.4), and the private endpoint (10.1.2.5), and fill in the table below:
| Target | Expected next hop | Actual |
|---|---|---|
| 1.1.1.1 | VirtualAppliance 10.0.0.4 | |
| 10.2.1.4 | VirtualAppliance 10.0.0.4 | |
| 10.1.2.5 | VnetLocal |
test-ip-flow to check outbound 443 and inbound 3389. On the “Animation” tab, select your environment's actual conditions to get a score and a fix order.Case 1: the “firewall problem” was actually DNS
Problem: on the night of launch, the application got 403 on every Key Vault access, and the network team spent two hours investigating the firewall. Root cause: the new spoke's DNS was still the Azure default, the private zone was linked only to the hub, so resolution returned a public IP, and Key Vault had public access disabled. Fix: point the spoke DNS to the Resolver's inbound endpoint and restart the VMs. Improvement: the subscription vending pipeline sets the DNS servers when it creates the VNet (item 9 on the review checklist).
Case 2: SNAT port exhaustion
Problem: many containers reach the same external API through the firewall, and connections fail intermittently. Diagnosis: the firewall metric for SNAT port utilization is close to 100%. Fix: add public IPs to the firewall (each public IP provides more SNAT ports), or associate a NAT gateway with AzureFirewallSubnet. For Azure services, switch to private endpoints.
Case 3: asymmetric routing causes “only connections initiated from on-premises drop”
Problem: connections initiated from Azure to on-premises work, but connections initiated from on-premises to Azure drop after 30 seconds. Diagnosis: the next hop differs in each direction: on-premises → spoke goes directly through the gateway, while spoke → on-premises goes through the firewall. Fix: add the spoke prefix to the GatewaySubnet → firewall UDR.
Interactive troubleshooting tree: connectivity and DNS
Start from the symptom, answer the questions step by step, and finally get diagnostic commands and fix suggestions.
Quick reference for common errors
test-connectivity error: Network Watcher agent not installed
Connection troubleshoot requires the Network Watcher agent extension on the VM: az vm extension set -g $RG_APP --vm-name vm-myapp-test -n NetworkWatcherAgentLinux --publisher Microsoft.Azure.NetworkWatcher.
nslookup: connection timed out; no servers could be reached
The VNet's DNS server is unreachable: the Resolver was deleted, the IP was entered incorrectly, or routes / NSGs / the firewall are blocking UDP / TCP 53. Check dhcpOptions.dnsServers and the next hop to that IP.
Next hop shows None
No route covers the destination prefix (for example, no UDR between spokes), or a UDR explicitly points to None. Add routes as designed.
1. Check whether the VM's outbound traffic to 10.1.2.5:443 is allowed by the NSG, and show the matching rule.
az network watcher test-ip-flow -g rg-lz-myapp-cc --vm vm-myapp-test --direction Outbound --protocol TCP --local 10.1.1.4:50000 --remote 10.1.2.5:443
2. Use Resource Graph to list the DNS server settings of all VNets.
az graph query -q "resources | where type =~ 'microsoft.network/virtualnetworks' | project name, dns=properties.dhcpOptions.dnsServers" -o table
A user reports that a VM in corp times out when accessing https://stmyapp.blob.core.windows.net, but archive.ubuntu.com works. Write out your troubleshooting steps.
① On the VM, run nslookup stmyapp.blob.core.windows.net. If it returns a public IP, go to the DNS branch (VNet DNS settings, private zone link, zone group, DINE compliance). If it returns a private IP (such as 10.1.2.5), continue. ② Run show-next-hop to that private IP: it should be VnetLocal or go through peering. If a UDR sends it to the firewall, check the firewall rules and the network policy on the private endpoint subnet. ③ Run test-ip-flow for outbound 443 and check the private endpoint subnet's NSG (if endpoint network policies are enabled). ④ Confirm the private endpoint connection is Approved and that the storage account firewall settings allow the private endpoint. ⑤ Verify end to end with test-connectivity. If outbound traffic works, the firewall and UDRs are working, so the problem is more likely in DNS or the private endpoint.
Verified teaching videos
Official documentation
- Azure Network Watcher overview
- Virtual network flow logs
- AVNM virtual network verifier
- Troubleshoot private endpoint connectivity
Video storyboard (about 80 seconds)
Visual: Four steps: DNS, routing, filtering, endpoint. An engineer skips the first step, rushes to the firewall, and falls.
Narration: When troubleshooting a network, check name resolution first, then routing and filtering.
Visual: In the terminal, the results of nslookup, show-next-hop, and test-ip-flow appear in turn, with a checkmark after each step.
Narration: Each Network Watcher tool answers one question: where the traffic goes, who blocks it, and whether it can get there.
Visual: The 12 review checklist items light up green one by one.
Narration: Turn checks into a checklist and review it every month, so problems are found before go-live.
Command cheat sheet
az network vnet create -g RG -n VNET --address-prefixes 10.1.0.0/16 az network vnet subnet create -g RG --vnet-name VNET -n snet-app \ --address-prefixes 10.1.1.0/24 --network-security-group NSG --default-outbound false az network vnet peering create -g RG -n PEER --vnet-name VNET \ --remote-vnet REMOTE_ID --allow-vnet-access --allow-forwarded-traffic az network vnet peering list -g RG --vnet-name VNET -o table
az network route-table create -g RG -n RT --disable-bgp-route-propagation true az network route-table route create -g RG --route-table-name RT -n default \ --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address 10.0.0.4 az network vnet subnet update -g RG --vnet-name VNET -n SUBNET --route-table RT az network firewall policy create -g RG -n POLICY --sku Basic az network firewall policy rule-collection-group create -g RG --policy-name POLICY -n RCG --priority 300 az network nic show-effective-route-table -g RG -n NIC -o table
az network manager create -g RG -n AVNM --scope-accesses Connectivity SecurityAdmin Routing \
--network-manager-scopes management-groups=/providers/Microsoft.Management/managementGroups/landingzones
az network manager group create -g RG --network-manager-name AVNM -n NG
az network manager post-commit -g RG --network-manager-name AVNM \
--commit-type Connectivity --configuration-ids CFG_ID --target-locations canadacentral
az network manager ipam-pool create -g RG --network-manager-name AVNM -n POOL --address-prefixes 10.0.0.0/12
az network vnet create -g RG -n VNET --ipam-allocations "[{\"numberOfIpAddresses\":\"256\",\"id\":\"POOL_ID\"}]"az network vnet-gateway create -g RG -n GW --vnet HUB --gateway-type Vpn \ --vpn-type RouteBased --sku VpnGw1AZ --public-ip-addresses PIP --no-wait az network local-gateway create -g RG -n LGW --gateway-ip-address 203.0.113.10 --local-address-prefixes 192.168.0.0/16 az network vpn-connection create -g RG -n CN --vnet-gateway1 GW --local-gateway2 LGW --shared-key KEY az network vnet-gateway list-learned-routes -g RG -n GW -o table az network vnet peering update -g RG --vnet-name HUB -n PEER --set allowGatewayTransit=true
az network private-dns zone create -g RG_DNS -n privatelink.blob.core.windows.net az network private-dns link vnet create -g RG_DNS -z ZONE -n LINK -v HUB_ID -e false az network private-endpoint create -g RG -n PE --vnet-name VNET --subnet snet-pe \ --private-connection-resource-id RES_ID --group-id blob --connection-name PLSC az network private-endpoint dns-zone-group list -g RG --endpoint-name PE -o table az dns-resolver create -g RG -n RESOLVER -l canadacentral --id HUB_ID az network vnet update -g RG -n SPOKE --dns-servers 10.0.2.4
az network application-gateway waf-policy create -g RG -n WAFP --type Microsoft_DefaultRuleSet --version 2.1 az network application-gateway waf-policy policy-setting update -g RG --policy-name WAFP --mode Prevention --state Enabled az network ddos-protection create -g RG -n DDOS az network vnet update -g RG -n VNET --ddos-protection true --ddos-protection-plan PLAN_ID az network public-ip update -g RG -n PIP --ddos-protection-mode Enabled
az policy assignment list --scope /providers/Microsoft.Management/managementGroups/corp -o table az policy state list --management-group corp --filter "complianceState eq 'NonCompliant'" -o table az policy remediation create -n REM --management-group corp \ --policy-assignment ASSIGNMENT_ID --definition-reference-id DINE-Private-DNS-Azure-Storage-Blob az policy exemption create -n EXM --scope SCOPE --policy-assignment ASSIGNMENT_ID \ --exemption-category Waiver --expires-on 2027-01-31T00:00:00Z
az network watcher show-next-hop -g RG --vm VM --source-ip SRC --dest-ip DST az network watcher test-ip-flow -g RG --vm VM --direction Outbound --protocol TCP --local SRC:50000 --remote DST:443 az network nic list-effective-nsg -g RG -n NIC az network watcher test-connectivity -g RG --source-resource VM --dest-address FQDN --dest-port 443 nslookup NAME # run on the source VM nc -zv -w 5 IP PORT
Key numbers
| Item | Value |
|---|---|
| Azure reserved addresses per subnet | 5 |
| AzureFirewallSubnet / AzureFirewallManagementSubnet | /26 / /26 |
| GatewaySubnet | /27 minimum (/26 for 16 ER circuits) |
| DNS Private Resolver subnet | /28–/24, about 10,000 QPS per endpoint |
| Virtual WAN hub prefix | Recommended /23 |
| Firewall throughput | Basic 250 Mbps · Standard 30 Gbps · Premium 100 Gbps |
| Azure platform DNS | 168.63.129.16 |
| Firewall rule collection order | DNAT → network → application (parent policy takes precedence) |
| Route selection | Longest prefix; for the same prefix, UDR > BGP > system |
| VPN non-AZ SKU retirement | 2026-09-30 |
| Front Door (classic) retirement | 2027-03-31 |
Capstone lab + final quiz
Scenario
myapp (Flask, port 5000) is to go live in the corp Landing Zone sub-lz-corp-myapp. Requirements: ① private connectivity with on-premises 192.168.0.0/16 (this lab uses simulated prefixes to verify routing and does not build a real tunnel); ② outbound access only to Ubuntu package sources and packages.microsoft.com; ③ the application's Blob storage is accessible only through a private endpoint, with DNS registered automatically by the platform; ④ no public IPs at all; ⑤ deliver a review report.
pool-cc, allocate (or associate an existing) 10.1.0.0/16 for the myapp spoke, and record the pool utilization.--default-outbound false).0.0.0.0/0 and 10.0.0.0/12 → 10.0.0.4, with gateway route propagation disabled. Application rules allow only the two FQDNs.python3 -m pip install flask requires the Ubuntu sources on the outbound allowlist; alternatively, install python3-flask with apt), listening on 5000. The NSG allows only 10.0.0.0/12 to reach port 5000.10.1.2.x, and get an HTTP response with curl -I https://<account>.blob.core.windows.net (for example, 400 / 403 means the network is reachable but no auth was sent).az account set -s $SUB_CONN az network firewall delete -g $RG_CONN -n $FW az dns-resolver delete -g $RG_CONN -n dnspr-hub-cc # delete the ruleset links, rulesets, and endpoints first az group delete -n $RG_DNS --yes --no-wait az group delete -n $RG_CONN --yes --no-wait # if you keep the hub for later hours, delete only the firewall and public IP az account set -s $SUB_APP az group delete -n $RG_APP --yes --no-wait # Finally: revoke the elevated access on the root management group
Acceptance checklist
Open-ended self-check (6 questions)
1. Under what conditions would you migrate an existing hub-spoke to Virtual WAN? What is the biggest risk of the migration?
Conditions: growth in regions and branch count, need for branch-to-branch transit, and a team that can't maintain the routing. Risks: during migration, two topologies coexist, causing duplicate prefix advertisement and asymmetric routing; custom resources in the hub (DNS forwarders, jump boxes) must move to the shared-services spoke; enabling routing intent changes the prefixes advertised to on-premises.
2. Why does ALZ place the private DNS zones in the connectivity subscription while the DINE assignment is in corp?
Zones must be globally unique and centrally linked to the hub to keep resolution consistent. But who needs automatic registration depends on the management group where the workload sits, so the assignment lives in corp, and its managed identity writes to zones in connectivity across scopes.
3. What scenarios suit Firewall Basic, Standard, and Premium, respectively?
Basic: small environments and labs (250 Mbps, no DNS proxy, threat intelligence alert-only). Standard: general production (DNS proxy, network rule FQDNs, threat intelligence deny, web categories). Premium: regulated industries (TLS inspection, IDPS, URL filtering).
4. Describe the root cause and fix when an on-premises → spoke connection drops after 30 seconds.
Asymmetric routing: the outbound direction goes through the gateway directly to the spoke, while the return direction follows the UDR through the firewall. The firewall has no session state, so it drops the traffic. Fix: add the spoke prefix to the GatewaySubnet → firewall UDR, or make both directions avoid the firewall.
5. An application needs a public entry point and a private backend. How do you divide it between corp and online?
Frontend entry (Front Door Premium, or App Gateway WAF v2 in online) + backend in corp (Private Link origin, or reached through the hub), avoiding piling up exemptions in corp.
6. In the second half of 2026, which lifecycle checks must be included in your network review?
VPN non-AZ SKUs (retire 2026-09-30) and legacy Standard / HighPerformance (2026-06); references to Basic public IPs; Application Gateway v1 (retired 2026-04-28); Front Door classic (2027-03-31); NSG flow logs (retire 2027-09-30), migrating to VNet flow logs; the impact of the default private subnet change on outbound traffic in new VNets.
Sources and versions
Source
| Topic | Source | Page date / version |
|---|---|---|
| ALZ management group hierarchy; corp / landingzones / connectivity assignments | Azure Landing Zones Library | platform/alz/2026.11.0 (2026-11-06) |
| Deploy-Private-DNS-Zones policy set (59 definitions) and parameters | Same as above, policy_set_definitions/Deploy-Private-DNS-Zones | 2026.11.0 |
| Role for the DINE private DNS definition (Network Contributor) | AzAdvertizer: Configure a private DNS Zone ID for blob groupID | Checked 2026-11-18 |
| Virtual WAN routing intent | How to configure Virtual WAN Hub routing policies | 2026-08-27 |
| AVNM overview and billing | What is Azure Virtual Network Manager? | 2026-07-29 |
| AVNM IPAM | IPAM in Azure Virtual Network Manager | 2026-07-29 |
| Azure Firewall SKU | Azure Firewall features by SKU | 2026-11-04 |
| Firewall rule processing | Azure Firewall rule processing logic | 2026-03-23 |
| Default outbound access / private subnets | Default outbound access | 2026-07-24 |
| VPN Gateway SKU retirement timeline | What's new in Azure VPN Gateway; Legacy SKUs | 2026-05-26 (updated 2026-09-17); 2026-02-27 |
| ExpressRoute gateway SKUs and limits | About ExpressRoute virtual network gateways; Gateway migration | 2026-09-05 |
| DNS Private Resolver | Azure DNS Private Resolver overview | 2026-06-22 |
| DDoS tiers | DDoS Protection tier comparison | 2026-10-29 |
| Front Door tiers and classic retirement | Front Door and CDN comparison | 2026-10-19 |
| Application Gateway v1 retirement | Application Gateway V1 retirement | Checked 2026-11-18 |
| NSG flow logs retirement | NSG flow logs overview | Updated 2026-11-05 |
| CAF network design | Define an Azure network topology; Private Link and DNS integration at scale | Checked 2026-11-18 |
Video verification note
Every video link on the video page was checked on 2026-11-18 through the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json) for its title and channel: f-GyAURZWzg, D3-3BfWXzSo, nDtCSQyG_I8, qNn83S55WHQ, fr5SSPZvmf0, JiUerkqyW0g, c1f4rmkrF6M, oevwZZ1YFS0, 2OVNx2quVP0, Pg7dGDwNNPU, 57ZwdztCx2w, rXbamGNz-xQ, V8ChsYAyxTc, DHiZbIks9i0, s1H2HpSJ-cg, 6cv-wdo9TJw, mluS8ovuBKg, 8wmfh9nGRCc, Hiohn35DIqA. Some videos were recorded before this hour, so SKUs, prices and retirement dates should be checked against this hour and the official docs. No verified video covers the difference between corp and online network policies specifically; Module 7 provides a storyboard script instead.
Voice narration
The “Voice” tab uses the browser's Web Speech API to read the narration script aloud (Chinese en-US, with terms pronounced in en-US). It does not upload any data. If no English voice pack is installed, you can read the narration script directly.
Known limitations
- All Azure CLI commands were written from the official docs and CLI help, and were not run against a real tenant. The output (IDs, IPs, times, compliance counts) is sample data.
az network manager,az dns-resolver,az network vhub routing-intentandaz network firewallare extension commands, and their parameters may change with the extension version. Check them with-hbefore you run them. - Costs are 2026-11 estimates for Firewall, gateways, DDoS and Front Door. The Azure pricing calculator is the reference.
- The format of the policy denial message is an example; the real message has more fields. The effects of the ALZ assignments come from the defaults in library 2026.11.0, and in a real deployment IaC parameters may override them.
- The animations and simulators are teaching models. The IPAM block-selection algorithm, the inbound attack simulator and the review weights are simplified illustrations. They do not represent the internal implementation of the services or their detection rates.
- The retirement timeline comes from official pages, and Microsoft may adjust it. Recheck the “What's new” page during your review.