Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.3.4. NAT Gateway

NAT Gateway provides outbound internet connectivity with consistent source IP addresses.

💡 First Principle: Without NAT Gateway, Azure VMs use ephemeral SNAT ports from Azure's pool. This can lead to port exhaustion under load and unpredictable source IPs. NAT Gateway solves both problems.

Capabilities:
FeatureValue
SNAT ports per IP64,000
Public IPsUp to 16 (1M+ ports total)
Throughput100 Gbps
Idle timeoutConfigurable 4-120 minutes
When to Use NAT Gateway:
ScenarioWithout NAT GatewayWith NAT Gateway
Outbound IP predictabilityRandom Azure IPsYour specific IPs
High outbound connectionsSNAT exhaustion risk64K+ ports
Firewall allowlistingComplex, dynamicSimple, static CIDR
Configuration:
  1. Create NAT Gateway
  2. Associate public IP(s) or prefix
  3. Associate with subnet(s)

⚠️ Exam Trap: NAT Gateway takes precedence over other outbound methods (Load Balancer outbound rules, VM public IPs for outbound). It does NOT provide inbound connectivity.

Alvin Varughese
Written byAlvin Varughese
Founder15 professional certifications