Study guide
1.3 Azure NAT Gateway & Outbound Connectivity
Designing and Implementing Microsoft Azure Networking Solutions AZ-700
Track your progress as you read
Finished sections get a check mark.
1 Introduction & AZ-700 Exam Overview
0.1 About the AZ-700 Exam: Format, Scoring & Skills Measured
2 Chapter 1: Azure Virtual Networks, Addressing & Subnet Architecture
1.1 VNet Planning, IP Addressing & Subnet Design 1.2 Virtual Network Peering & Global Peering 1.3 Azure NAT Gateway & Outbound Connectivity 1.4 Azure Virtual Network Manager (AVNM) & Network Groups 1.5 Public IP Addresses, Public IP Prefixes & Custom IP Prefixes (BYOIP)
3 Chapter 2: Azure Name Resolution & Core Routing
2.1 Azure DNS & Private DNS Zones 2.2 Azure Private DNS Resolver & Hybrid Name Resolution 2.3 System Routes & User-Defined Routes (UDR) 2.4 BGP & Custom Route Propagation 2.5 Azure Route Server & Dynamic NVA Route Exchange
4 Chapter 3: Hybrid Connectivity with Azure VPN Gateway
3.1 Azure VPN Gateway Architecture & SKUs 3.2 Site-to-Site (S2S) VPN & High Availability 3.3 Point-to-Site (P2S) VPN & Client Authentication 3.4 Azure Extended Network, Always On VPN & Azure Network Adapter
5 Chapter 4: Azure ExpressRoute & Virtual WAN
4.1 Azure ExpressRoute Architecture & Peering Models 4.2 ExpressRoute Routing, Resiliency & Global Reach 4.3 Azure Virtual WAN Architecture & Hub Routing 4.4 ExpressRoute BFD, Monitoring & Connection Troubleshooting
6 Chapter 5: Regional Load Balancing & Application Gateway
5.1 Azure Load Balancer Architecture & Rules 5.2 Azure Application Gateway Architecture & Routing 5.3 Web Application Firewall (WAF) on Application Gateway 5.4 Inbound NAT Rules, Port Forwarding & Health Probe Design
7 Chapter 6: Global Traffic Management & Azure Front Door
6.1 Azure Front Door Architecture & Routing 6.2 Azure Traffic Manager & DNS Load Balancing 6.3 Load Balancing Decision Matrix & Multi-Tier Design 6.4 Web Application Firewall on Azure Front Door
8 Chapter 7: Azure Private Link & Service Endpoints
7.1 Virtual Network Service Endpoints & Policies 7.2 Azure Private Endpoints & Private Link Architecture 7.3 Private Endpoint DNS Integration & Hybrid Resolution 7.4 Azure Private Link Service for Multi-Tenant Solutions
9 Chapter 8: Network Security Groups & Azure Bastion
8.1 Network Security Groups (NSGs) & Application Security Groups (ASGs) 8.2 Azure Bastion Architecture & Secure Remote Access 8.3 Azure Virtual Network Manager Security Admin Rules
10 Chapter 9: Azure Firewall & Security Policies
9.1 Azure Firewall Architecture & Rule Processing 9.2 Azure Firewall Manager & DDoS Protection
11 Chapter 10: Azure Network Observability & Troubleshooting
10.1 Network Watcher Diagnostic Tools 10.2 NSG Flow Logs, VNet Flow Logs & Traffic Analytics 10.3 Network Troubleshooting Scenarios & End-to-End Connectivity 10.4 Azure Monitor Network Insights & Defender for Cloud Network Posture
1.3 Azure NAT Gateway & Outbound Connectivity
Key Takeaways Explain This Topic AI
Azure NAT Gateway is a fully managed, software-defined outbound SNAT service associated at the subnet level that provides dynamic, on-demand SNAT port allocation.
Unlike Azure Load Balancer which assigns a fixed/static number of SNAT ports per instance, NAT Gateway dynamically allocates ports from a shared pool, eliminating SNAT port exhaustion for bursty workloads.
A single NAT Gateway supports up to 16 Standard Public IP addresses (or a Public IP prefix up to /28), delivering up to 1,024,000 concurrent outbound SNAT flows (64,000 per IP).
NAT Gateway takes highest routing precedence for outbound internet egress on its assigned subnet, overriding Load Balancer outbound rules and legacy default internet access.
Microsoft's mandatory architecture milestone permanently retires Default Outbound Access for all new VNets on March 31, 2026, making explicit egress mechanisms mandatory.
Last updated: August 2026
Azure NAT Gateway & Outbound Connectivity
Connecting private cloud workloads to internet-hosted APIs, software repositories, and external SaaS endpoints requires Source Network Address Translation (SNAT) . SNAT rewrites a virtual machine's private IP and port to a public IP and port, tracking the connection state in a translation table so return packets can be delivered back to the private originator.
Historically, Azure provided implicit outbound internet connectivity (termed Default Outbound Access ). However, default access is unmanaged, subject to unpredictable SNAT port exhaustion, and insecure. Azure NAT Gateway provides the modern, scalable, production-standard solution for enterprise egress.
1. The March 31, 2026 Default Outbound Access Retirement
Microsoft has established a fundamental architectural deadline for all cloud network engineers:
Important
March 31, 2026 Egress Mandate: Effective March 31, 2026 , Default Outbound Access is permanently retired for all newly created Virtual Networks. VMs provisioned without an explicit outbound connectivity method (NAT Gateway, User-Defined Route to Azure Firewall/NVA, or Standard Load Balancer Outbound Rules) will have zero outbound internet connectivity . +-----------------------------------------------------------------------------+
- | AZURE OUTBOUND CONNECTIVITY METHODS MATRIX |
- | |
- | Method Scope SNAT Allocation Recommended Scenario |
- | ------------------ ---------- --------------- -------------------- |
- | Azure NAT Gateway Subnet Dynamic On-Demand Production Workloads |
- | Azure Firewall / NVA Subnet / VNet Stateful / FQDN Security Inspection |
- | Public Load Balancer Backend Pool Static Allocated Inbound + Return SNAT |
- | Default Access Implicit Static Small Pool RETIRED (Do Not Use) |
- +-----------------------------------------------------------------------------+
- 2. Azure NAT Gateway Architecture & Mechanics
Azure NAT Gateway (Virtual Network NAT) is a distributed, fully managed software-defined service that provides direct outbound internet connectivity for all virtual machines and private endpoints residing in an associated subnet. +-----------------------------------------------------------------------------+
- | AZURE NAT GATEWAY SUBNET ARCHITECTURE |
- | |
- | [Public Internet] <===================================================+ |
- | ^ | |
- | | (Static Public IPs: 20.50.10.1, 20.50.10.2 -> 128,000 Ports) | |
- | +-------------------------------------------------------------------+ | |
- | | Azure NAT Gateway Resource (Zone-Redundant / 50 Gbps Throughput) | | |
- | +-------------------------------------------------------------------+ | |
- | ^ ^ | |
- | | (Associated to Subnet) | (Associated to Subnet) | |
- | +--------------------------+ +--------------------------+ | |
- | | Subnet: Web-Tier | | Subnet: Worker-Tier | | |
- | | - VM-1 (10.0.1.4) | | - Worker-A (10.0.2.4) | | |
- | | - VM-2 (10.0.1.5) | | - Worker-B (10.0.2.5) | | |
- | | Dynamic SNAT on Demand | | Dynamic SNAT on Demand | | |
- | +--------------------------+ +--------------------------+ | |
- | |
- | NOTE: A Subnet can bind to exactly ONE NAT Gateway. |
- | A NAT Gateway can bind to MULTIPLE Subnets within the SAME VNet. |
- +-----------------------------------------------------------------------------+
Core Structural Rules:
Subnet-Level Association: A NAT Gateway is attached directly to one or more subnets within a virtual network. It cannot span multiple VNets.
One Gateway Per Subnet: A subnet can have at most one NAT Gateway attached.
No GatewaySubnet Attachment: NAT Gateway cannot be deployed in or attached to a GatewaySubnet , AzureFirewallSubnet , or AzureFirewallManagementSubnet .
Zone-Resiliency: NAT Gateways can be deployed as Zone-Redundant (automatically spanning availability zones) or pinned to a specific Zonal boundary.
Loading diagram... Azure Outbound Egress Routing and SNAT Decision Flow
3. SNAT Port Allocation: Static vs. Dynamic On-Demand
Understanding why applications encounter outbound connection drops during high concurrency requires analyzing how SNAT ports are allocated.
The 5-Tuple Connection Flow
Every outbound TCP/UDP session uses a unique 5-tuple: Flow = ( Source IP , Source Port , Protocol , Destination IP , Destination Port ) \text{Flow} = (\text{Source IP}, \text{Source Port}, \text{Protocol}, \text{Destination IP}, \text{Destination Port}) Flow = ( Source IP , Source Port , Protocol , Destination IP , Destination Port )
Each public IP address provides 64,000 ephemeral SNAT ports (ports 1024 through 65535).
Load Balancer Static Allocation vs. NAT Gateway Dynamic Allocation
Attribute Azure Standard Load Balancer Outbound Azure NAT Gateway
Allocation Model Static Pre-Allocation: Pre-assigns a fixed number of SNAT ports (e.g., default 1,024) per backend VM instance. Dynamic On-Demand: Ports are allocated in real time from a shared pool to whatever VM needs them.
Port Exhaustion Risk High: If a single busy VM exhausts its 1,024 allocated ports, its new outbound flows fail immediately—even if other VMs have thousands of unused ports. Zero Port Waste: A single VM running bursty microservice calls can consume all 64,000 ports across the entire pool without artificial per-VM ceilings.
Idle Timeout 4 to 30 minutes (TCP) 4 minutes (default), configurable up to 120 minutes for long-lived flows.
TCP Reset (RST) Configurable on idle timeout Sends bidirectional TCP RST on idle timeout to cleanly tear down dead client/server sockets.
4. Scaling Capacity & Public IP Prefixes
A single Azure NAT Gateway can scale outbound egress to massive enterprise levels:
Public IP Scaling: You can attach up to 16 Standard Public IP addresses or a Public IP Prefix (up to /28 ) to a single NAT Gateway.
Concurrent Flow Capacity: Total Concurrent Flows = 16 × 64 , 000 = 1 , 024 , 000 concurrent SNAT flows \text{Total Concurrent Flows} = 16 \times 64,000 = 1,024,000 \text{ concurrent SNAT flows} Total Concurrent Flows = 16 × 64 , 000 = 1 , 024 , 000 concurrent SNAT flows
Throughput Performance: Scales automatically up to 50 Gbps of total outbound data transfer without manual bandwidth provisioning.
5. Routing Precedence & Inbound/Outbound Asymmetry
When multiple network services coexist on the same subnet, Azure evaluates outbound routing according to strict precedence rules: +-----------------------------------------------------------------------------+
- | OUTBOUND ROUTING PRECEDENCE ORDER |
- | |
- | 1. User-Defined Route (UDR) pointing 0.0.0.0/0 to Virtual Appliance / FW |
- | 2. Azure NAT Gateway (Overrides Load Balancer & Default Outbound) |
- | 3. Instance-Level Public IP (Standard PIP directly on VM NIC) |
- | 4. Azure Load Balancer Outbound Rules |
- | 5. Default Outbound Access (Deprecated / Retired) |
- +-----------------------------------------------------------------------------+
- Inbound / Outbound Asymmetric Flow Handling
When a VM sits behind a Public Standard Load Balancer (for inbound web traffic) and its subnet is attached to a NAT Gateway (for outbound egress):
Inbound Connections: Traffic arriving through the Load Balancer's public frontend IP is returned back through the Load Balancer's connection tracking table, maintaining flow symmetry.
New Outbound Connections: Traffic initiated by the VM to external APIs egresses through the NAT Gateway's public IP, fully separating inbound application traffic from outbound operational traffic.