AzureFixes Logo
AZUREFIXES
DEBUG FASTER. DEPLOY SMARTER.
Published on
3 min read

Diagnosing Azure Firewall SNAT Limits

Diagnosing Azure Firewall SNAT Limits

When outbound traffic from private Azure subnets is routed through Azure Firewall, Source Network Address Translation (SNAT) is applied. Each SNAT translation consumes a port on one of the firewall’s public IP addresses. Hitting SNAT port limits can cause serious outbound connectivity issues.

What is Azure Firewall SNAT?

When internal clients access public endpoints through Azure Firewall, the firewall translates the source IP address of each connection to one of its own public IPs, using a SNAT port.

SNAT Port Limits

FactorLimit
Per Public IP64,000 SNAT ports
Per Destination IP:Port~1,024 ports per public IP
Default (Single IP)2,496 ports to a single destination
Scales WithNumber of Public IPs attached

Each client-to-destination connection uses a port. If too many clients or too many connections target the same destination (e.g., microsoft.com:443), port exhaustion can occur.

Symptoms of SNAT Exhaustion

  • Outbound connection failures
  • Intermittent or stuck HTTP calls
  • TCP connection resets or timeouts
  • Frequent SnatPortExhausted errors in logs
  • Data uploads/downloads fail partially or intermittently

Diagnostic Steps

1. Enable Azure Firewall Diagnostic Logs

{
  "operationName": "AzureFirewallSNAT",
  "msg": "SNAT port exhausted",
  "srcIp": "10.1.2.3",
  "dstIp": "52.109.12.34",
  "protocol": "TCP",
  "srcPort": "34567",
  "dstPort": "443"
}

Enable log category: AzureFirewallSnat

2. Review Azure Monitor Metrics

Track:

  • SNAT Port Utilization
  • SNAT Allocation Count
  • SNAT Port Exhausted Count

Set alerts if utilization exceeds 70–80% consistently.

3. Use Network Watcher Packet Capture

Capture traffic on the Azure Firewall:

  • Analyze how many unique destinations are being hit
  • Check for frequent short-lived connections
  • See if a few destinations dominate SNAT consumption

4. Flow Log or Traffic Analytics Review

Use Traffic Analytics or NSG Flow Logs to find:

  • High-frequency clients
  • Unusual port churn
  • Top destination endpoints

Mitigation Strategies

Add More Public IPs

Each additional Standard Public IP adds 64,000 ports.

3 IPs = 3 × 64,000 = 192,000 SNAT ports

Application Optimization

  • Reuse TCP connections (connection pooling)
  • Avoid frequent open/close of sockets
  • Minimize simultaneous outbound calls

Use User Defined Routes

Split outbound traffic by workload or subnet:

Route critical workload through a dedicated firewall

Offload to NVA

Use a Network Virtual Appliance (NVA) for outbound traffic:

  • No SNAT limits like Azure Firewall
  • Can be tailored for high connection loads

For high-throughput workloads with repeated connections to a fixed public destination, consider using Azure NAT Gateway instead of Firewall for SNAT.

Related Resources


Pro Tip: SNAT issues are more common when hundreds of short-lived HTTPS connections go to a few IPs like *.windowsupdate.com, *.microsoftonline.com, or your SIEM endpoints. These are classic culprits. Rotate IPs or distribute traffic smartly.

Related Articles

Fixing Azure WAF False Positives: A 7-Phase Diagnostic Guide

If Azure WAF is blocking legitimate traffic after a policy update, new deployment, or rule set upgrade, false positives are the most common cause. This guide walks through 7 diagnostic phases to identify, reproduce, and safely exclude the offending rule — without disabling WAF protection.

Fixing Azure VPN Gateway High CPU: BGP Route Explosion Diagnosis and Fix

If your VPN Gateway CPU is above 85% while traffic volume looks normal, BGP route bloat is almost certainly the cause. This guide covers the exact commands to diagnose it, route summarization on the CE router, an Azure-side prefix filter for defense in depth, and when to upgrade the gateway SKU.

Fixing Enterprise SSO and OAuth Failures in Entra ID: An 8-Step Diagnostic Guide

If your enterprise SSO logins are returning AADSTS errors, redirect_uri mismatches, or silent token refresh failures, this guide walks through 8 diagnostic steps to locate and fix the root cause — covering OAuth 2.0, OIDC, Entra ID app registration, and high-availability token caching.

Diagnosing Kubernetes DNS Resolution Failures: CoreDNS Upstream Forwarding Broken by resolv.conf Drift

If some pods in your AKS cluster resolve external DNS names fine and others fail — from the same Deployment, same image, same config — the variable is the node. This guide covers the exact test sequence to isolate CoreDNS upstream forwarding failures, identify /etc/resolv.conf drift on worker nodes, and fix it without reprovisioning.

How to Diagnose Azure ExpressRoute Gateway Control-Plane Failure

If your ExpressRoute Gateway shows BGP Connected but cross-premises traffic is down and effective routes on spoke VNet NICs are empty, the gateway has a control-plane failure. This guide covers the diagnostic commands to confirm it, a regional failover procedure, and the zone-redundant HA architecture to prevent recurrence.