Azure Firewall – Complete Guide

Azure Firewall SKU selection, Hub-Spoke architecture, rule collection processing, IDPS with 58,000+ signatures, TLS inspection, and KQL threat hunting queries.

🔥 Azure Firewall

Azure Firewall is a cloud-native, stateful firewall-as-a-service with built-in high availability and unlimited cloud scalability. It's deployed in Hub VNets and inspects all traffic flowing between Spoke VNets and to/from the internet.

Basic / Standard / Premium IDPS TLS Inspection Hub-Spoke

📋 Overview & SKUs

FeatureBasicStandardPremium
FQDN Filtering
Network Rules (IP/Port)
Application Rules (FQDN)
Threat IntelligenceBasic✅ Alert+Deny✅ Alert+Deny
IDPS (Intrusion Detection)✅ 58,000+ signatures
TLS Inspection
URL Filtering (full path)
Web Categories
Throughput250 Mbps30 Gbps30 Gbps

🏗️ Hub-Spoke Architecture

Azure Firewall is placed in the Hub VNet. All Spoke VNets route traffic through the Hub Firewall via User Defined Routes (UDRs). This centralizes all egress/ingress inspection.

Hub VNet (10.0.0.0/16)
├── AzureFirewallSubnet (10.0.1.0/26) ← Azure Firewall (min /26, no NSG!)
├── GatewaySubnet (10.0.0.0/27)       ← VPN/ExpressRoute Gateway
└── AzureBastionSubnet (10.0.2.0/27)  ← Azure Bastion

Spoke VNet 1 – Workloads (10.1.0.0/16)
└── UDR: 0.0.0.0/0 → Azure Firewall Private IP

Spoke VNet 2 – Data (10.2.0.0/16)
└── UDR: 0.0.0.0/0 → Azure Firewall Private IP
⚠️
AzureFirewallSubnet requirements: Minimum /26 subnet, no NSG attached. NSGs on the Firewall subnet are not supported and will break the deployment.

📜 Rule Types

Rule TypeLayerDescription
DNAT RulesL3/L4Inbound traffic: translate public IP:port to internal IP:port
Network RulesL3/L4Allow/deny based on IP, port, protocol
Application RulesL7Allow/deny based on FQDN, URL categories, protocols (HTTP/HTTPS)

Rule Priority: DNAT → Network Rules → Application Rules. First matching rule wins.

⚙️ Firewall Policy

portal.azure.com › Firewall Policies › prod-fw-policy › Rule collections
Overview
DNS settings
Rule collections
IDPS
TLS inspection
Home › Firewall Policiesprod-fw-policy › Rule collections
prod-fw-policy | Rule collections
+ Add rule collection
NameTypePriorityAction
Deny-Inbound-RDPNetwork100Deny
Allow-AzureServicesNetwork200Allow
App-Allow-HTTPSApplication300Allow
💡 Lower priority number = higher precedence. Deny rules should have priority 100–199.
📸 Azure Firewall Policy rule collections — Network rules evaluated before Application rules

Firewall Policy is the recommended configuration method. It supports policy hierarchy: Parent Policy (global baseline) → Child Policies (per-region/environment). Child policies inherit parent rules but can add their own.

🛡️ IDPS – Intrusion Detection & Prevention

Premium only. IDPS has 58,000+ signatures covering CVEs, exploit kits, botnets, lateral movement, and C2 communication.

ModeBehavior
OffIDPS disabled
AlertLog matching traffic, no block
Alert and DenyBlock and log matching traffic (recommended)

🔐 TLS Inspection

Premium only. TLS Inspection decrypts HTTPS traffic, inspects the payload, then re-encrypts. Requires an Intermediate CA certificate stored in Key Vault.

  1. Deploy an Intermediate CA certificate to Azure Key Vault
  2. Grant Azure Firewall Managed Identity access to the certificate
  3. Enable TLS Inspection in the Firewall Policy
  4. Configure trusted CA certificates for internal services
  5. Application Rules with HTTPS will now decrypt and inspect traffic

🌐 URL Filtering

Premium only. URL Filtering can block based on the full URL path (not just domain), and can use Web Categories to block entire categories (Social Media, Gambling, Adult Content, etc.).

🔎 KQL Queries

Blocked Traffic by Firewall

AzureDiagnostics
| where Category == "AzureFirewallNetworkRule"
| where msg_s contains "Deny"
| extend SourceIP = extract(@"from (\d+\.\d+\.\d+\.\d+)", 1, msg_s)
| extend DestIP = extract(@"to (\d+\.\d+\.\d+\.\d+)", 1, msg_s)
| summarize BlockCount = count() by SourceIP, DestIP, bin(TimeGenerated, 1h)
| order by BlockCount desc

Threat Intelligence Hits

AzureDiagnostics
| where Category == "AzureFirewallThreatIntelLog"
| project TimeGenerated, msg_s, SourcePort_d, DestinationPort_d
| order by TimeGenerated desc

IDPS Alerts (Premium)

AzureDiagnostics
| where Category == "AzureFirewallIDPSSignatureHit"
| project TimeGenerated, SignatureId_d, SeverityLevel_s,
          SourceIP, DestinationIP, Protocol_s, Action_s
| order by TimeGenerated desc

✅ Checklist – Azure Firewall

    🚀 Deployment
  • Deploy in AzureFirewallSubnet (/26, no NSG)
  • Use Firewall Policy (not classic rules)
  • Configure UDRs on all spoke subnets → Firewall private IP
  • Enable Availability Zones for production
  • 🛡️ Security
  • Enable Threat Intelligence in Alert and Deny mode
  • Enable IDPS in Alert and Deny mode (Premium)
  • Enable TLS Inspection for outbound HTTPS (Premium)
  • Configure DNS Proxy (forward DNS through Firewall)
  • 📊 Monitoring
  • Enable Diagnostic Settings → Log Analytics
  • Create alert for IDPS high-severity detections
  • Create alert for Threat Intel hits