Prev Next

Cloud / Azure Firewall Interview questions

Last updated

1. What is Azure Firewall? 2. What are the Azure Firewall SKUs? 3. What are the key features of Azure Firewall? 4. What is the purpose of the AzureFirewallSubnet? 5. What are the types of rules in Azure Firewall? 6. What is a Firewall Policy in Azure Firewall? 7. What is the purpose of FQDN tags in Azure Firewall? 8. What are service tags in Azure Firewall rules? 9. What is threat intelligence-based filtering in Azure Firewall? 10. What is SNAT in Azure Firewall? 11. How do you deploy Azure Firewall using Azure CLI? 12. What is the purpose of IP Groups in Azure Firewall? 13. What is Azure Firewall Manager? 14. What is Azure Firewall Premium and when do you need it? 15. What is the purpose of DNS proxy in Azure Firewall? 16. How do you route traffic through Azure Firewall? 17. How do you publish an internal web server using an Azure Firewall DNAT rule? 18. How is Azure Firewall billed? 19. What logs does Azure Firewall provide? 20. What metrics should you monitor on Azure Firewall? 21. What is the difference between Azure Firewall and NSG? 22. What is the difference between Azure Firewall and Application Gateway WAF? 23. Explain the rule processing order in Azure Firewall? 24. How do you allow outbound access to a specific website through Azure Firewall? 25. Why use multiple public IP addresses on Azure Firewall? 26. How does autoscaling work in Azure Firewall? 27. How does Azure Firewall achieve high availability? 28. Why does Azure Firewall SNAT inbound DNAT traffic? 29. How do you troubleshoot SNAT port exhaustion on Azure Firewall? 30. When should you choose Azure Firewall over a third-party NVA? 31. How does a hub-and-spoke design use Azure Firewall? 32. How do you configure forced tunneling on Azure Firewall? 33. Why do FQDN network rules require DNS proxy? 34. How do you find denied traffic in Azure Firewall logs? 35. Which Azure Firewall SKU should you choose? 36. How does policy inheritance work in Azure Firewall? 37. How does IDPS work in Azure Firewall Premium? 38. Explain the TLS inspection flow in Azure Firewall Premium? 39. What is the difference between URL filtering, web categories and FQDN filtering? 40. How do you inspect traffic between on-premises and Azure using Azure Firewall? 41. How do you troubleshoot traffic blocked by Azure Firewall? 42. How do you troubleshoot asymmetric routing with Azure Firewall? 43. How do you filter traffic to private endpoints with Azure Firewall? 44. How can you optimize Azure Firewall rules? 45. How can you reduce Azure Firewall cost? 46. How does Azure Firewall work with Virtual WAN secured hubs? 47. How do you deploy Azure Firewall using Bicep? 48. What are the limitations of Azure Firewall? 49. Explain the packet flow of an outbound request through Azure Firewall? 50. How do you secure AKS egress with Azure Firewall?

1. What is Azure Firewall?

Azure Firewall is a managed, cloud-native network security service that filters traffic for resources in Azure virtual networks. It is stateful, so return traffic for an allowed connection is permitted automatically, and it comes with built-in high availability and autoscaling. There are no firewall VMs for you to patch or size.

It filters on IP address, port, protocol and FQDN, supports inbound DNAT and outbound SNAT, and uses Microsoft threat intelligence to flag or block known malicious destinations. Logs flow into Azure Monitor.

In most designs it sits in a hub virtual network, and spoke traffic is routed through it with user-defined routes.

Take quiz
Azure Firewall is best described as:
a stateless packet filter attached to every NIC
a reverse proxy that only inspects HTTP payloads
a managed, stateful network firewall with built-in high availability
Who patches and scales the underlying Azure Firewall instances?
You, through a VM scale set you provision
Your network team using Azure Policy
The spoke VNet owner
Microsoft, as part of the managed service

2. What are the Azure Firewall SKUs?

Azure Firewall comes in three tiers: Basic, Standard and Premium. Pick the tier by the inspection depth and throughput you need.

SKU Aimed at Key capabilities
Basic Small and medium businesses L3-L7 filtering, threat intelligence in alert mode only, throughput up to about 250 Mbps
Standard General enterprise use Network and application rules, FQDN tags, threat intelligence with deny, throughput up to about 30 Gbps
Premium Regulated or high-security workloads Everything in Standard plus TLS inspection, IDPS, URL filtering and web categories, up to about 100 Gbps

Tiers can be upgraded in place, and a Standard policy can be attached to a Premium firewall, but a Premium policy cannot be attached to a Standard firewall.

Take quiz
Which SKU is required for TLS inspection?
Premium
Basic
Standard
Which SKU targets small and medium businesses with modest throughput needs?
Basic
Premium
Standard
None, the SKU is chosen automatically

3. What are the key features of Azure Firewall?

Azure Firewall's core job is controlling traffic by identity of the destination rather than just IP address. The main features are:

  • Stateful filtering of network (L3/L4) and application (FQDN) traffic
  • Built-in high availability and autoscaling, with optional availability zones
  • FQDN tags and service tags for Microsoft services
  • Threat intelligence filtering using Microsoft's feed
  • Outbound SNAT and inbound DNAT, with multiple public IPs
  • DNS proxy, forced tunneling and IP Groups
  • Central management through Firewall Policy and Firewall Manager
  • Logs and metrics in Azure Monitor

Premium adds TLS inspection, IDPS, URL filtering and web categories on top of this list.

Take quiz
Which feature lets you allow Windows Update without listing individual domains?
FQDN tags
IP Groups
DNS zones
Route tables
Which of these is NOT something you manage yourself with Azure Firewall?
Rule definitions
Patching and scaling the firewall instances
Which route tables send traffic to it
Diagnostic log destinations

4. What is the purpose of the AzureFirewallSubnet?

AzureFirewallSubnet is the dedicated subnet where Azure Firewall places its instances. The name must match exactly, otherwise deployment fails.

The subnet needs a prefix of /26 or larger, which leaves room for the firewall to scale out. The firewall's private IP address comes from this range, and that address is what you use as the next hop in route tables.

Treat the subnet as reserved. Do not deploy other resources into it, and do not attach an NSG to it, because filtering is done by the firewall's own rules.

Take quiz
What is the minimum recommended size of AzureFirewallSubnet?
/28
/26
/24
/29
Where does the firewall's private IP used in route tables come from?
The GatewaySubnet
The spoke subnet that sends traffic
The AzureFirewallSubnet address range
Azure DNS

5. What are the types of rules in Azure Firewall?

Azure Firewall has three rule types, and each solves a different problem.

Rule type Purpose Matches on
DNAT Publish an internal service on the firewall's public IP Destination public IP and port, translated to a private IP and port
Network Allow or deny any protocol by address Source, destination IP or service tag, port, protocol
Application Allow or deny web and FQDN-based traffic FQDN, FQDN tag, with HTTP, HTTPS or MSSQL protocols

Rules live in rule collections, which have an action (Allow or Deny) and a priority. Collections sit in rule collection groups inside a Firewall Policy. Anything not allowed is denied by default.

Take quiz
Which rule type would you use to forward public port 443 on the firewall to an internal web server?
Application rule
Network rule
DNAT rule
Threat intelligence rule
Which rule type filters by FQDN such as *.contoso.com?
Network rule
Application rule
DNAT rule

6. What is a Firewall Policy in Azure Firewall?

A Firewall Policy is a standalone Azure resource that holds the configuration for one or more firewalls: rule collection groups, rules, threat intelligence mode, DNS settings, and on Premium the IDPS and TLS inspection settings.

Because it is separate from the firewall, one policy can be associated with many firewalls across regions and subscriptions. Policies can also inherit from a parent policy, so a central security team sets baseline rules while application teams add their own in a child policy.

Policies are the recommended model. The older classic rules stored directly on the firewall cannot be shared or inherited, and Firewall Manager only works with policies.

Take quiz
What is the main advantage of a Firewall Policy over classic rules?
It removes the need for a public IP
It makes the firewall stateless
It disables logging to reduce cost
One policy can be reused and inherited across many firewalls
Which tool centrally manages Firewall Policies across regions?
Azure Firewall Manager
Azure Advisor
Azure Blueprints only
Network Watcher

7. What is the purpose of FQDN tags in Azure Firewall?

An FQDN tag is a Microsoft-maintained group of fully qualified domain names that a well-known Azure or Microsoft service needs to function. Examples include WindowsUpdate, AzureBackup, WindowsVirtualDesktop and AzureKubernetesService.

Instead of hunting down and maintaining dozens of domains, you reference the tag in an application rule and Microsoft keeps the list current.

You cannot create your own FQDN tags, and they work only in application rules. For your own domain lists, use FQDN targets directly.

A typical rule allows source 10.1.0.0/24 to use the WindowsUpdate tag over HTTP and HTTPS, so patching works without opening general internet access.

Take quiz
FQDN tags can be used in which rule type?
Application rules
Network rules only
DNAT rules
Any rule type
Who maintains the list of domains behind an FQDN tag?
The firewall administrator
Microsoft
Your DNS provider
The Azure Policy service

8. What are service tags in Azure Firewall rules?

A service tag represents a group of IP address prefixes for an Azure service, such as Storage, Sql or AzureMonitor. Microsoft updates the prefixes as the service changes, so your rules do not drift.

In Azure Firewall you use service tags as the destination in network rules. They are IP-based, so they work for non-HTTP traffic as well.

Service tag FQDN tag
Based on IP prefixes Domain names
Used in Network rules Application rules
Example Storage WindowsUpdate

For instance, a network rule can allow a subnet to reach the Storage tag on port 443 while everything else stays denied. When Microsoft adds a new storage prefix, the rule covers it without any edit from you.

Take quiz
Service tags are used as destinations in which Azure Firewall rule type?
Application rules
Network rules
Route tables
Threat intelligence feed
A service tag represents:
a custom tag you attach to a firewall resource
a list of domain names for Windows services
a Microsoft-maintained group of IP prefixes for a service
a billing category

9. What is threat intelligence-based filtering in Azure Firewall?

Threat intelligence filtering compares traffic against Microsoft's feed of known malicious IP addresses, FQDNs and URLs. These are sources tied to botnets, malware distribution and similar activity.

It has three modes: Off, Alert only and Alert and deny. Alert only is the default, which logs a match without blocking it. Basic supports alert mode only.

Threat intelligence is evaluated before your NAT, network and application rules, so a flagged destination is caught even if a broad allow rule would otherwise permit it. You can add allow-listed FQDNs and IPs to handle false positives.

Take quiz
What does Alert and deny mode do when traffic matches the feed?
Only logs the event
Redirects traffic to a honeypot
Logs the event and blocks the traffic
Disables the matching rule collection
When is threat intelligence evaluated relative to your rules?
After all application rules
Only when no rule matches
Only for DNAT rules
Before DNAT, network and application rules

10. What is SNAT in Azure Firewall?

SNAT (source network address translation) rewrites the source address of outbound traffic to the firewall's public IP, so internet destinations see the firewall rather than your private VM addresses.

By default Azure Firewall does not SNAT traffic going to private ranges such as RFC 1918 addresses, since both sides can route to each other. You can change this with the policy's private IP ranges setting, for example to SNAT traffic to an on-premises range that cannot route back to your spoke addresses.

Each public IP provides a limited pool of SNAT ports, so high-volume outbound workloads may need more public IPs or a NAT gateway.

Take quiz
By default, does Azure Firewall SNAT traffic destined for RFC 1918 private ranges?
Yes, always
Only for HTTPS traffic
Only for DNAT rules
No, private destinations are not SNATed
What limits how many concurrent outbound connections SNAT can support?
The number of SNAT ports available per public IP
The size of the AzureFirewallSubnet
The number of rule collection groups
The number of spoke VNets

11. How do you deploy Azure Firewall using Azure CLI?

You need four things: a VNet with a subnet named AzureFirewallSubnet, a Standard static public IP, a Firewall Policy, and the firewall itself with an IP configuration tying them together.

az network vnet create -g rg-hub -n vnet-hub --address-prefixes 10.0.0.0/16 \
  --subnet-name AzureFirewallSubnet --subnet-prefixes 10.0.0.0/26
az network public-ip create -g rg-hub -n pip-fw --sku Standard --allocation-method Static
az network firewall policy create -g rg-hub -n fwpol-hub --sku Standard
az network firewall create -g rg-hub -n fw-hub --sku AZFW_VNet --tier Standard \
  --firewall-policy fwpol-hub
az network firewall ip-config create -g rg-hub -f fw-hub -n fw-ipconfig \
  --public-ip-address pip-fw --vnet-name vnet-hub

Older CLI versions need the azure-firewall extension. After deployment, note the firewall's private IP, because your route tables will point to it.

Take quiz
What must the firewall's public IP SKU be?
Standard, with static allocation
Basic, with dynamic allocation
Any SKU with dynamic allocation
No public IP is ever allowed
What must the subnet that hosts the firewall be named?
FirewallSubnet
AzureFirewallSubnet
snet-firewall
Any name you choose

12. What is the purpose of IP Groups in Azure Firewall?

An IP Group is a named, reusable set of IP addresses, ranges or CIDR blocks that you reference in the source or destination of DNAT, network and application rules.

If ten rules refer to the same branch-office ranges, you can store those ranges once in an IP Group and update the group when a range changes. Every rule that uses it picks up the change, so there is no hunting through collections.

IP Groups keep rules readable and cut down on mistakes, especially when the same address sets appear across several policies.

A typical example is an IP Group named branch-offices that holds every branch CIDR range. Rules that allow branch access to a shared service all point to that group, and onboarding a new branch is a one-line change.

Take quiz
What is the main benefit of an IP Group?
It adds a second public IP to the firewall
Define addresses once and reuse them across many rules
It encrypts traffic between subnets
It replaces the need for a route table
Where can an IP Group be referenced?
Only in diagnostic settings
Only in route tables
In rule source and destination fields
Only in DNS records

13. What is Azure Firewall Manager?

Azure Firewall Manager is a central management service for Azure Firewall deployments across subscriptions and regions. Its main object is the Firewall Policy, which you create once and associate with many firewalls.

It supports two architectures: a hub virtual network, where you run the firewall in your own VNet, and a secured virtual hub, which is a Virtual WAN hub with a firewall built in. Firewall Manager also handles route configuration to send traffic through the secured hub.

Policy inheritance is the other big draw, since a global base policy can be enforced while local teams manage child policies.

Take quiz
What is Firewall Manager's central object for configuration?
Network Security Group
Route filter
Firewall Policy
Resource lock
Which architecture uses a Virtual WAN hub with a built-in firewall?
Hub VNet with NVA
Spoke-only VNet
Peered gateway transit
Secured virtual hub

14. What is Azure Firewall Premium and when do you need it?

Azure Firewall Premium adds deeper inspection on top of Standard: TLS inspection, IDPS (signature-based intrusion detection and prevention), URL filtering and web categories.

You need it when filtering by domain is not enough. For example, compliance frameworks such as PCI DSS expect intrusion detection, and security teams often want to see inside encrypted traffic or block categories such as gambling or anonymizers.

Premium needs a Premium Firewall Policy and runs on higher-performance infrastructure, so it costs more per hour and per GB than Standard. If you only need FQDN and network filtering, Standard is enough.

Take quiz
Which feature is exclusive to Premium?
FQDN filtering
Network rule filtering
DNAT rules
IDPS
Why might a team pick Premium over Standard?
To inspect encrypted traffic and block by URL or web category
To avoid needing a Firewall Policy
To remove the need for a public IP
To get a free tier

15. What is the purpose of DNS proxy in Azure Firewall?

When DNS proxy is enabled, the firewall listens on port 53 and forwards queries from your VMs to the DNS servers you configure, or to Azure DNS by default. You point the VNet's DNS setting to the firewall's private IP.

This matters for FQDN filtering. The firewall and the client resolve the same name through the same path, so the IP in a network rule that uses an FQDN matches what the client actually connects to.

It also gives you DNS query logging, and it lets you route queries to custom or on-premises DNS servers from one place.

To set it up, enable DNS proxy in the firewall policy, optionally add custom DNS servers, then change the VNet's DNS servers setting to the firewall's private IP. Restart or renew the VMs' DHCP lease so they pick up the change.

Take quiz
What must VMs use as their DNS server when DNS proxy is enabled?
The firewall's private IP address
The public IP of the firewall
168.63.129.16 only
Any public resolver
What does DNS proxy listen on?
TCP port 443 only
UDP and TCP port 53
UDP port 123
TCP port 8080

16. How do you route traffic through Azure Firewall?

Azure Firewall only sees traffic that is sent to it, so you use a user-defined route (UDR). Create a route table with a default route 0.0.0.0/0, set the next hop type to Virtual appliance, set the next hop address to the firewall's private IP, and attach it to each spoke subnet.

az network route-table create -g rg-spoke -n rt-spoke --disable-bgp-route-propagation true
az network route-table route create -g rg-spoke --route-table-name rt-spoke \
  -n default-to-fw --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-spoke --vnet-name vnet-spoke -n snet-app \
  --route-table rt-spoke

Spoke-to-spoke traffic also needs routes pointing at the firewall, and peerings must allow forwarded traffic. Without these, spokes may talk directly and bypass inspection.

Take quiz
What next hop type sends traffic to Azure Firewall from a UDR?
Virtual network gateway
Virtual appliance
Internet
VNet local
Which destination prefix forces all outbound traffic to the firewall?
10.0.0.0/8
168.63.129.16/32
0.0.0.0/0
255.255.255.255/32

17. How do you publish an internal web server using an Azure Firewall DNAT rule?

A DNAT rule maps a destination address and port on the firewall's public IP to a private address and port behind it.

  1. Pick a public IP attached to the firewall.
  2. Create a DNAT rule collection in a rule collection group.
  3. Set the source to the allowed clients, the destination to the firewall's public IP, and the destination port, for example 443.
  4. Set the translated address to the web server's private IP, and the translated port, for example 8443.
  5. Make sure the web subnet's route sends return traffic back through the firewall.

The firewall automatically allows the translated flow with an implicit network rule, so you do not add a second rule. Limit the source to known ranges rather than *, since a wide-open DNAT rule exposes the server to the whole internet.

Take quiz
What does a DNAT rule translate?
A private IP to the public IP of the client
FQDNs to IP addresses
The firewall's public IP and port to a private IP and port
SNAT ports to ephemeral ports
Which source is safest for a DNAT rule?
The wildcard *
0.0.0.0/0 with port range 1-65535
The AzureFirewallSubnet range
A specific list of trusted client ranges

18. How is Azure Firewall billed?

Azure Firewall billing has two main parts: a fixed hourly deployment charge that depends on the SKU, and a data processing charge per GB for traffic that passes through. Premium rates are higher than Standard, and Basic is the cheapest.

Billing starts as soon as the firewall is deployed, whether or not it handles traffic. Public IP addresses, log storage and Log Analytics ingestion are billed separately, and so are data transfer charges for peered VNets or cross-region traffic.

A development firewall left running around the clock can cost more than the VMs it protects, so deallocating it when idle is worth considering.

Take quiz
Which two main components make up Azure Firewall pricing?
Per-rule charge and per-user charge
Only a flat monthly license
Per-DNS-query charge only
An hourly deployment charge and per-GB data processing
When does the hourly charge start?
When the firewall is deployed, even with no traffic
Only when traffic first arrives
Only when a rule is created
After 30 days

19. What logs does Azure Firewall provide?

Azure Firewall writes its logs through diagnostic settings, so nothing is stored unless you turn it on. Logs can go to a Log Analytics workspace, a storage account or an event hub.

The main categories are application rule logs, network rule logs, NAT rule logs, DNS proxy logs, and threat intelligence logs, plus IDPS logs on Premium. Each entry shows the source, destination, protocol, action and which rule matched.

In resource-specific mode, logs land in dedicated tables such as AZFWApplicationRule, AZFWNetworkRule, AZFWNatRule, AZFWThreatIntel, AZFWIdpsSignature and AZFWDnsQuery. This is easier to query and cheaper than the older single AzureDiagnostics table.

Take quiz
Where are Azure Firewall logs sent?
To destinations you choose in diagnostic settings
Automatically to Microsoft Defender only
Nowhere, logs cannot be exported
Directly into the route table
Which table holds network rule logs in resource-specific mode?
AzureActivity
AZFWNetworkRule
AZFWRuleBook
Heartbeat

20. What metrics should you monitor on Azure Firewall?

A handful of platform metrics tell you whether the firewall is healthy and right-sized.

  • Firewall health state shows whether the firewall is healthy or degraded, for example from SNAT port pressure.
  • Throughput shows how close you are to the SKU's capacity.
  • SNAT port utilization warns you before outbound connections start failing.
  • Data processed helps explain and forecast the bill.
  • Application and network rule hit count shows which rules are actually used.
  • Latency probe gives an indication of the firewall's average latency.

Create alerts on SNAT port utilization and firewall health at a minimum. Those are the two that most often precede an outage.

Take quiz
Which metric warns you about running out of outbound ports?
Latency probe
SNAT port utilization
Data processed
Rule hit count
What does rule hit count help you identify?
The firewall's public IP changes
The cost of Log Analytics
Rules that are never or rarely used
DNS cache size

21. What is the difference between Azure Firewall and NSG?

Both filter traffic, but they work at different scopes. An NSG is a free, distributed filter applied to a subnet or NIC that works on IP, port and protocol. Azure Firewall is a centralized, managed service that adds FQDN filtering, threat intelligence, central logging and shared policy.

NSG Azure Firewall
Scope Subnet or NIC Central, per VNet or hub
Layers L3 and L4 L3 to L7
FQDN filtering No (service tags only) Yes
Threat intelligence No Yes
Cost Free Hourly plus per GB

They complement each other. Use NSGs for micro-segmentation inside a subnet or between tiers, and Azure Firewall for central egress control and east-west inspection between spokes.

Take quiz
Which of these can Azure Firewall do that an NSG cannot?
Filter by source IP address
Filter by destination port
Filter outbound traffic by FQDN
Be attached to a subnet
What is the usual recommendation for using both?
Use only the firewall and delete all NSGs
Use NSGs only for internet traffic
Use the firewall only for DNS
Use NSGs for local segmentation and the firewall for central control

22. What is the difference between Azure Firewall and Application Gateway WAF?

Azure Firewall is a network firewall. It controls outbound, spoke-to-spoke and hybrid traffic for any protocol, and publishes services through DNAT. Application Gateway with WAF is a regional L7 reverse proxy that protects inbound HTTP and HTTPS applications from attacks such as SQL injection and cross-site scripting using OWASP rules.

Azure Firewall Application Gateway WAF
Protocols Any IP traffic HTTP and HTTPS
Main direction Outbound and east-west, plus DNAT inbound Inbound web traffic
Protection Network and FQDN rules, threat intel, IDPS OWASP rule sets, bot protection
Terminates sessions Only with TLS inspection (Premium) Yes, as a reverse proxy

For internet-facing web apps, a common pattern is WAF in front and Azure Firewall controlling the rest.

Take quiz
Which service protects a public web app from SQL injection?
Azure Firewall Standard
A route table
A public IP prefix
Application Gateway with WAF
Which service is better for controlling outbound traffic from many spokes?
Azure Firewall
Application Gateway WAF
Azure Load Balancer
Traffic Manager

23. Explain the rule processing order in Azure Firewall?

Azure Firewall stops at the first rule that matches, and anything unmatched is denied. With a Firewall Policy, the evaluation works like this:

  1. Threat intelligence is checked first, and may alert or deny.
  2. Rule collection groups are processed by priority, lowest number first (range 100 to 65000).
  3. Inside a group, collections are processed by type: DNAT, then network, then application, and by priority within each type.
  4. If no rule matches, the default is deny.
flowchart TD
  A["Packet arrives"] --> B{Threat intel match?}
  B -- Deny mode --> X[Drop]
  B -- No --> C{DNAT rule match?}
  C -- Yes --> T["Translate and allow"]
  C -- No --> D{Network rule match?}
  D -- Yes --> E["Apply allow or deny"]
  D -- No --> F{Application rule match?}
  F -- Yes --> G["Apply allow or deny"]
  F -- No --> H["Default deny"]

A practical result is that a network rule matching a flow means the application rules are never evaluated for it.

Take quiz
What happens when no rule matches a packet?
It is denied by default
It is allowed and logged
It is sent to the next hop unchanged
It is queued until a rule is added
Which rule type is evaluated first inside a rule collection group?
Application rules
DNAT rules
Network rules
Threat intelligence only
Which priority value is processed first?
The highest number
The one created first
The lowest number
The one with the most rules

24. How do you allow outbound access to a specific website through Azure Firewall?

Use an application rule with the protocol (HTTP, HTTPS) and the target FQDN. Place it in a rule collection in a rule collection group on the firewall's policy.

az network firewall policy rule-collection-group create -g rg-hub \
  --policy-name fwpol-hub -n AppRuleGroup --priority 300

az network firewall policy rule-collection-group collection add-filter-collection \
  -g rg-hub --policy-name fwpol-hub --rule-collection-group-name AppRuleGroup \
  --name allow-docs --collection-priority 1000 --action Allow \
  --rule-name allow-learn --rule-type ApplicationRule \
  --source-addresses 10.1.0.0/24 --protocols Https=443 \
  --target-fqdns learn.microsoft.com

Wildcards such as *.contoso.com are supported. For HTTPS, Standard matches on the SNI in the TLS handshake, so it can filter by domain but not by URL path. URL paths need Premium with TLS inspection.

Remember that the rule collection group priority and the collection priority decide evaluation order, so place this allow above any broad deny.

Take quiz
Which rule type fits an HTTPS request to a named website?
DNAT rule
Application rule
Route table rule
NSG rule
What does Azure Firewall Standard use to filter HTTPS by domain?
Decrypting the full request
Reverse DNS of the destination
The SNI in the TLS handshake
The client's browser cookie

25. Why use multiple public IP addresses on Azure Firewall?

Extra public IPs give you two things: more SNAT capacity and more control over outbound addresses.

Each public IP provides its own pool of SNAT ports, so adding IPs raises the number of simultaneous outbound connections to the same destination. This helps when the firewall serves many VMs calling a small set of endpoints.

Multiple IPs also let you expose several services on the same port through DNAT, each on its own address, and give you a fixed set of source addresses that partners can add to their allow-lists. Public IP prefixes are a convenient way to get a contiguous block.

Take quiz
What is a main reason to attach more public IPs to the firewall?
To reduce the hourly firewall charge
To enable the firewall to run without a subnet
To increase available SNAT ports
To disable threat intelligence
Why do partners care about the firewall's public IPs?
They determine the DNS TTL
They set the rule priority
They control TLS versions
They can add them to their IP allow-lists

26. How does autoscaling work in Azure Firewall?

Azure Firewall scales out and in automatically, with no instance count to configure. It watches throughput, CPU and connection counts, and adds capacity when utilization crosses internal thresholds.

Scale-out is not instant and takes several minutes, so very sudden spikes can see brief degradation. Standard handles up to about 30 Gbps and Premium up to about 100 Gbps.

If you know a big event is coming, such as a load test, send traffic ahead of time to warm the firewall up. Watch the throughput and health metrics, and make sure the AzureFirewallSubnet is large enough (/26) to allow instances to be added.

Take quiz
What signals trigger Azure Firewall to scale out?
Rule count only
The number of public IPs
Time of day schedules
Throughput, CPU and connection count
Why must AzureFirewallSubnet be at least /26?
So there is room for scale-out instances
To hold the route table
To host the DNS proxy VM
To store log files

27. How does Azure Firewall achieve high availability?

Azure Firewall is built on multiple instances behind the scenes and replaces failed ones without your involvement. With a single region deployment, you can improve resilience further with availability zones.

When you deploy across two or three zones, instances are spread across physically separate datacenters in the region, so a zone outage does not take the firewall down. The service-level agreement is higher with zones than without.

Zones must be chosen at deployment time, and there is no extra charge for the configuration itself, but cross-zone data transfer may be billed. For disaster recovery across regions, deploy a second firewall and share a policy between them.

Take quiz
What improves Azure Firewall's resilience against a datacenter failure?
Deploying across availability zones
Adding more NSGs
Using a Basic public IP
Placing it in the GatewaySubnet
When must you choose availability zones?
Any time through a toggle
At deployment time
Only after the first month
Never, it is automatic

28. Why does Azure Firewall SNAT inbound DNAT traffic?

When a DNAT rule forwards traffic to a backend server, the firewall rewrites the destination to the private IP and also translates the source to its own private IP. The backend sees the firewall as the client.

This keeps the flow symmetric. The server replies to the firewall's address, and the response returns through the same firewall instance, so the stateful session is preserved. Without it, the server might reply using its default route and the traffic would bypass the firewall and break.

The downside is that the original client IP is lost in the server's own logs. To keep it, use an Application Gateway in front, which adds an X-Forwarded-For header, or read the real client address from the firewall logs.

Take quiz
What source address does the backend server see for DNAT traffic?
The original client's public IP
The firewall's private IP
The firewall's public IP
The server's own IP
Why is the source rewritten?
To reduce licensing costs
To hide the server from DNS
To keep return traffic symmetric through the firewall
To enable IDPS

29. How do you troubleshoot SNAT port exhaustion on Azure Firewall?

SNAT port exhaustion shows up as intermittent outbound failures or timeouts to a specific destination, even though rules allow the traffic. Start with the SNAT port utilization metric. A value near 100 percent confirms the problem.

Then fix it in order of effort:

  1. Add more public IPs or a public IP prefix, since each IP brings its own SNAT ports.
  2. Associate a NAT gateway with the AzureFirewallSubnet, which supports many more ports and IPs.
  3. Reduce port usage in the application with connection pooling and keep-alives.
  4. Check logs to find which source is opening the most connections to one destination.

Ports are allocated per destination, so many connections to the same IP and port consume them fastest.

Take quiz
Which metric confirms SNAT port exhaustion?
Throughput
Rule hit count
SNAT port utilization
Data processed
Which resource can you associate with AzureFirewallSubnet to scale SNAT capacity?
A second route table
An NSG with outbound rules
A load balancer rule
A NAT gateway

30. When should you choose Azure Firewall over a third-party NVA?

Choose Azure Firewall when you want a managed service with minimal operations: no VMs to patch, built-in scaling and high availability, native Azure Monitor integration and rule changes through policy or IaC.

Choose a third-party network virtual appliance when you need a specific feature set or vendor tooling that Azure Firewall does not provide, for example advanced application-layer controls tied to an existing enterprise firewall vendor, or one consistent policy across on-premises and cloud from that vendor.

Azure Firewall Third-party NVA
Operations Managed by Microsoft You manage VMs, updates and HA
Scaling Automatic Manual or vendor-specific
Skills Azure-native Vendor-specific
Licensing Per hour plus per GB Vendor license plus VM cost

Many large organizations run both, with Azure Firewall for general egress and an NVA for specialized needs.

Take quiz
What is a key reason to choose Azure Firewall over an NVA?
It supports every vendor's proprietary features
It runs on your own VMs
It has no hourly charge
It is managed, so no patching or manual scaling
When might an NVA be preferable?
When you need vendor-specific features or unified vendor policy
When you want zero configuration
When you have no virtual networks
When you only need DNS

31. How does a hub-and-spoke design use Azure Firewall?

In hub-and-spoke, shared services live in a hub VNet and each workload lives in a spoke VNet peered to the hub. Azure Firewall sits in the hub, and every spoke subnet has a UDR sending 0.0.0.0/0 to the firewall's private IP.

That puts one inspection point on internet egress, spoke-to-spoke traffic, and traffic to or from on-premises through the gateway in the hub. Rules, logging and threat intelligence are managed in one place instead of per spoke.

flowchart LR
  S1["Spoke A VNet"] -- UDR 0.0.0.0/0 --> FW["Azure Firewall in Hub VNet"]
  S2["Spoke B VNet"] -- UDR 0.0.0.0/0 --> FW
  FW --> I[Internet]
  FW --> G["VPN or ExpressRoute Gateway"]
  G --> O[On-premises]

Peerings need allow forwarded traffic enabled, and spoke route tables should not learn gateway routes by BGP, or traffic may skip the firewall.

Take quiz
Where is Azure Firewall normally placed in hub-and-spoke?
In the hub VNet
In every spoke VNet
In the on-premises datacenter only
In the GatewaySubnet
What sends spoke traffic to the firewall?
VNet peering by itself
A UDR with a 0.0.0.0/0 route to the firewall's private IP
An NSG outbound rule
Azure DNS

32. How do you configure forced tunneling on Azure Firewall?

Forced tunneling sends all internet-bound traffic from the firewall to another next hop, such as an on-premises firewall or an NVA, instead of straight to the internet.

Azure Firewall needs a separate path for its own management traffic, so you must create a second subnet called AzureFirewallManagementSubnet (/26 or larger) with its own public IP. This management NIC keeps talking to Azure directly.

  1. Create AzureFirewallManagementSubnet and a management public IP.
  2. Deploy the firewall with the management IP configuration.
  3. Add a route table on AzureFirewallSubnet with 0.0.0.0/0 pointing to the on-premises or NVA next hop, or learn the default route over BGP.

Remember that SNAT then happens at the next hop, so make sure return routes work, and that Basic always uses the management subnet.

Take quiz
What extra subnet does forced tunneling require?
AzureBastionSubnet
AzureFirewallManagementSubnet
GatewaySubnet
RouteServerSubnet
What does forced tunneling do?
Encrypts all traffic with IPsec automatically
Disables SNAT on the firewall
Sends internet-bound traffic to another next hop such as an on-premises firewall
Moves the firewall to another region

33. Why do FQDN network rules require DNS proxy?

A network rule works on IP addresses, so when you use an FQDN as the destination the firewall must resolve it to IPs. If the client resolves the name using a different DNS server or at a different moment, the two can get different answers, which is common with CDNs and geo-DNS.

The result is that the firewall allows one IP while the client connects to another, and the rule seems to randomly fail. Enabling DNS proxy makes clients resolve through the firewall, so both use the same answers and stay in step.

For this reason, FQDN in network rules is only supported when DNS proxy is on. For plain web traffic, an application rule avoids the problem because it matches on the name inside the request, not on a resolved IP.

Take quiz
What is the main risk of FQDN network rules without DNS proxy?
The firewall stops logging
The rule priority is ignored
The client and the firewall may resolve different IPs
The public IP is released
Which rule type avoids this issue for web traffic?
DNAT rules
NSG rules
Service tag rules
Application rules

34. How do you find denied traffic in Azure Firewall logs?

Send logs to Log Analytics in resource-specific mode and query the rule tables. This example shows the top blocked web destinations in the last hour:

AZFWApplicationRule
| where TimeGenerated > ago(1h) and Action == "Deny"
| summarize Hits = count() by SourceIp, Fqdn, Rule
| top 20 by Hits desc

For non-web traffic, query AZFWNetworkRule the same way and group by DestinationIp and DestinationPort. If a flow does not appear in either table, it may have been dropped earlier by threat intelligence, so also check AZFWThreatIntel.

Look at the Rule, RuleCollection and Policy columns to see exactly which rule decided the outcome.

Take quiz
Which table holds application rule decisions in resource-specific mode?
AZFWNatRule
Perf
AzureMetrics
AZFWApplicationRule
In the example query, which filter selects blocked traffic?
Action == "Deny"
Protocol == "TCP"
TimeGenerated > ago(1h)
Rule != ""

35. Which Azure Firewall SKU should you choose?

Start with what you must inspect, then size for throughput and budget.

  • Basic: small environments with modest traffic, up to about 250 Mbps, and simple filtering with threat intelligence in alert mode.
  • Standard: the usual choice for production egress control with FQDN, network rules and threat intelligence deny, up to about 30 Gbps.
  • Premium: when you must see inside TLS, need IDPS, URL filtering or web categories, or work under compliance rules that require them, up to about 100 Gbps.

Moving from Standard to Premium is an in-place upgrade, so starting at Standard is low risk. Keep in mind that Premium needs a Premium policy, and that TLS inspection requires certificate setup with Key Vault and client trust of your CA.

Take quiz
Which SKU is the usual starting point for production egress filtering?
Standard
Basic
Premium for every case
There is only one SKU
What drives the need for Premium?
Needing more than one rule
TLS inspection, IDPS or URL and category filtering
Needing logs
Wanting DNAT

36. How does policy inheritance work in Azure Firewall?

A child policy inherits everything from its parent policy. This lets a central security team publish a baseline that application teams cannot weaken.

Rules from the parent are always evaluated before the child's rules, whatever priority numbers the child uses. The child can add its own rule collection groups, but cannot edit or remove inherited ones.

Settings such as DNS, threat intelligence mode and IDPS are inherited too, and the child can override them where allowed. Any change to the parent flows to all children automatically.

For example, a central team can enforce a parent rule that denies known risky categories, while each application team adds a child rule collection group to allow its own FQDNs.

Take quiz
In what order are parent and child rules evaluated?
Child rules first
Parent rules first, then child rules
Interleaved strictly by priority number
Random order
Can a child policy delete an inherited parent rule?
Yes, if it uses a lower priority
Yes, from the portal only
No, inherited rules are read-only in the child
Only on Premium

37. How does IDPS work in Azure Firewall Premium?

IDPS inspects traffic for known attack patterns using a signature database with tens of thousands of signatures across dozens of categories, such as malware, exploits and command-and-control. Microsoft updates the signatures continuously.

You choose one of three modes in the policy: Off, Alert or Alert and deny. Start in Alert mode, review which signatures fire, then move to Alert and deny. You can override individual signatures when a legitimate application triggers a false positive, and bypass specific sources or destinations.

IDPS covers inbound, outbound, spoke-to-spoke and hybrid traffic. To inspect the content of encrypted sessions, it must be combined with TLS inspection, otherwise it can only see unencrypted payloads and headers.

Take quiz
What is the recommended way to roll out IDPS?
Go straight to Alert and deny
Leave it Off
Start in Alert mode, review, then move to Alert and deny
Disable all signatures
What is needed for IDPS to inspect encrypted payloads?
A Basic public IP
NSG flow logs
A second route table
TLS inspection

38. Explain the TLS inspection flow in Azure Firewall Premium?

With TLS inspection, the firewall acts as a trusted man-in-the-middle for outbound HTTPS. It ends the client's TLS session, inspects the clear text, then opens a new TLS session to the real server.

sequenceDiagram
  participant C as Client
  participant F as Azure Firewall Premium
  participant S as Web Server
  C->>F: TLS ClientHello for site
  F->>S: New TLS session to the real site
  S-->>F: Server certificate
  F-->>C: Certificate for site signed by your intermediate CA
  C->>F: Encrypted request
  F->>F: Decrypt, apply IDPS and URL filtering
  F->>S: Re-encrypted request

Setting it up needs a Premium policy, an intermediate CA certificate stored in Key Vault, a managed identity so the firewall can read it, and TLS inspection enabled in the application rules. Clients must trust your root CA, or they will see certificate warnings.

You can exclude sensitive categories such as banking or healthcare from inspection for privacy and compliance.

Take quiz
Where is the CA certificate for TLS inspection stored?
In the AzureFirewallSubnet
In the client browser only
In the route table
In Azure Key Vault
What must clients do so users do not see certificate warnings?
Trust the root CA that signed the intermediate certificate
Disable TLS entirely
Use a Basic public IP
Use HTTP only

39. What is the difference between URL filtering, web categories and FQDN filtering?

All three decide which web destinations are allowed, but at different levels of detail.

FQDN filtering URL filtering Web categories
Matches on Domain name Full URL including path Microsoft-defined site category
Example *.contoso.com contoso.com/downloads/* Social networking, gambling
SKU Standard and Premium Premium Premium
HTTPS handling Uses SNI, no decryption Needs TLS inspection to see the path Works by domain, deeper with TLS inspection

FQDN rules are blunt but cheap and need no certificates. Use URL filtering when only part of a site should be reachable, and web categories when managing thousands of domains by hand is impractical.

Take quiz
Which option can allow only contoso.com/downloads while blocking the rest of the site?
URL filtering
FQDN filtering
Service tags
IP Groups
What does an HTTPS URL path rule require?
A Basic SKU
TLS inspection
DNS proxy turned off
A NAT gateway

40. How do you inspect traffic between on-premises and Azure using Azure Firewall?

Traffic from on-premises arrives through a VPN or ExpressRoute gateway in the hub. To inspect it, you must make sure it goes to the firewall before reaching spokes, and that replies take the same path.

  1. On the GatewaySubnet, add a route table with the spoke address prefixes pointing to the firewall's private IP.
  2. On each spoke subnet, add a route sending on-premises prefixes (or 0.0.0.0/0) to the firewall, and disable BGP propagation on that route table.
  3. Create network rules allowing the required on-premises and spoke ranges.
  4. Review SNAT settings so replies return to the same firewall.

Without the gateway route table, traffic would be forwarded directly into the spoke by the peering and bypass the firewall.

Take quiz
Which subnet needs a route table to push on-premises-to-spoke traffic through the firewall?
AzureFirewallSubnet
GatewaySubnet
AzureBastionSubnet
The DNS subnet
What happens without that route table?
The firewall inspects it twice
The gateway drops all traffic
Traffic reaches the spoke directly and bypasses the firewall
The firewall changes the VPN protocol

41. How do you troubleshoot traffic blocked by Azure Firewall?

Work from the symptom to the rule that made the decision.

  1. Confirm traffic actually reaches the firewall. Check the VM's effective routes, or use Network Watcher next hop.
  2. Search AZFWNetworkRule and AZFWApplicationRule logs by source IP and destination. Note the action and rule name.
  3. If there is no entry, check AZFWThreatIntel and AZFWIdpsSignature, since these can block earlier.
  4. Check the rule order. A broad deny or a higher-priority collection may match first.
  5. For FQDN issues, verify DNS and whether DNS proxy is on, and look at AZFWFqdnResolveFailure if available.
  6. Add or adjust the specific rule, then retest.

If there are no logs at all, the problem is usually upstream: the route table, an NSG or a peering setting.

Take quiz
What is the first thing to confirm when traffic seems blocked?
That the firewall SKU is Premium
That Log Analytics is in another region
That the traffic is actually reaching the firewall
That the VM has a public IP
Which tool shows the next hop for a VM's traffic?
Azure Advisor cost view
Key Vault access policy
Resource Graph tags
Network Watcher next hop

42. How do you troubleshoot asymmetric routing with Azure Firewall?

Asymmetric routing happens when the request goes through the firewall but the reply takes a different path. Because the firewall is stateful, it sees a reply for a session it never saw and drops it. Typical symptoms are connections that hang after the SYN, or one-way traffic.

Common causes are a UDR on only one side of a spoke-to-spoke flow, on-premises routes that send replies straight to the spoke, or traffic within the same subnet that never leaves it.

  • Check effective routes on both source and destination NICs.
  • Make sure both sides route to the firewall for each other's prefixes.
  • Use SNAT for the flow so replies return to the firewall's address.
  • Review gateway route tables and BGP-learned routes that may override your UDRs.

The firewall logs often show only half of the flow, which is itself a clue.

Take quiz
Why does Azure Firewall drop asymmetric flows?
It blocks all return traffic by design
It only inspects UDP
Because the SKU is Basic
It is stateful and never saw the first packet of the session
Which fix helps ensure replies return to the firewall?
SNAT the flow to the firewall's address
Remove the route table from the source
Disable the firewall's DNS proxy
Add a second NSG

43. How do you filter traffic to private endpoints with Azure Firewall?

By default, traffic to a private endpoint uses the more specific /32 system route and bypasses your UDR, so it never reaches the firewall.

There are two ways to bring it back:

  • Enable network policies for private endpoints on the subnet that hosts the client, so UDRs and NSGs apply.
  • Or add a /32 UDR for each private endpoint IP, pointing at the firewall.
az network vnet subnet update -g rg-spoke --vnet-name vnet-spoke -n snet-app \
  --private-endpoint-network-policies Enabled

Then allow the traffic with a network rule to the endpoint's private IP. Also SNAT this traffic so that replies come back through the firewall, as the endpoint would otherwise reply along a different path.

Take quiz
What is the default behavior of private endpoint traffic with a UDR?
It bypasses the UDR because of a more specific system route
It always goes through the firewall
It is dropped
It is sent to the internet
What setting lets UDRs apply to private endpoint traffic?
Disabling the private endpoint
Network policies for private endpoints on the subnet
Enabling DNS proxy
Moving the endpoint to AzureFirewallSubnet

44. How can you optimize Azure Firewall rules?

Over time, rule sets accumulate duplicates, overly broad allows and rules nobody uses. Policy Analytics in Firewall Manager helps by analyzing your logs against your policy.

It shows rule hit counts, finds unused and overlapping rules and suggests tighter source and destination scopes. It needs logs sent to Log Analytics in resource-specific mode.

  • Remove or disable rules with no hits over a long period.
  • Replace * sources and destinations with specific ranges.
  • Use IP Groups and FQDN or service tags to reduce rule count.
  • Merge rules that differ only by one address.
  • Keep frequently hit rules at lower priority numbers within their type.

Smaller, cleaner rule sets are easier to audit and faster to change safely.

Take quiz
Which feature analyzes logs to find unused and overlapping rules?
Cost Management
Policy Analytics
Azure Advisor networking
NSG flow logs
What is a good optimization for wide-open rules?
Add more wildcards
Raise priorities randomly
Replace wildcard sources and destinations with specific ranges
Disable logging

45. How can you reduce Azure Firewall cost?

Cost is mostly the hourly deployment charge plus data processed, so reduce both.

  • Share one firewall in a hub for many spokes instead of one per workload.
  • Use the right SKU: Basic for dev or small sites, Standard by default, Premium only where required.
  • Deallocate non-production firewalls outside working hours.
  • Keep traffic that does not need inspection off the firewall, for example low-risk traffic within a spoke, which an NSG can handle.
  • Avoid cross-region and unnecessary hairpin traffic through the firewall.
  • Trim logging to what you use, and consider cheaper log tiers.

Review the data processed metric to see where the volume comes from before changing the design.

Take quiz
Which action reduces cost for non-production environments?
Adding more public IPs
Upgrading to Premium
Deallocating the firewall when it is not in use
Enabling more log categories
What is a cost benefit of a shared hub firewall?
It removes the data processing charge
It disables autoscale
It makes logging free
You pay one hourly charge for many spokes

46. How does Azure Firewall work with Virtual WAN secured hubs?

In Azure Virtual WAN, a hub that includes an Azure Firewall is called a secured virtual hub. Microsoft manages the hub infrastructure, and you manage the firewall through Firewall Manager and a Firewall Policy.

Traffic is steered by routing intent and policies. You choose whether private traffic (VNet-to-VNet, branch-to-VNet), internet traffic, or both go through the firewall, and Virtual WAN programs the routes for you.

Hub VNet Secured virtual hub
Routing Manual UDRs Automated by routing intent
Control Full control of the VNet Managed hub, less control
Best for Custom designs, NVAs alongside Large-scale multi-region and branch networks

The trade-off is less flexibility in exchange for much less routing work.

Take quiz
What is a Virtual WAN hub with an Azure Firewall called?
A peering hub
A transit VNet
A gateway spoke
A secured virtual hub
What replaces manual UDRs in a secured virtual hub?
Routing intent and policies
Static NAT tables
NSG rules
DNS conditional forwarders

47. How do you deploy Azure Firewall using Bicep?

In Bicep you declare a firewallPolicies resource and an azureFirewalls resource that references it, together with the subnet and public IP IDs.

param fwSubnetId string
param pipId string

resource pol 'Microsoft.Network/firewallPolicies@2023-09-01' = {
  name: 'fwpol-hub'
  location: resourceGroup().location
  properties: {
    sku: { tier: 'Standard' }
    threatIntelMode: 'Alert'
  }
}

resource fw 'Microsoft.Network/azureFirewalls@2023-09-01' = {
  name: 'fw-hub'
  location: resourceGroup().location
  properties: {
    sku: { name: 'AZFW_VNet', tier: 'Standard' }
    firewallPolicy: { id: pol.id }
    ipConfigurations: [
      {
        name: 'fw-ipconfig'
        properties: {
          subnet: { id: fwSubnetId }
          publicIPAddress: { id: pipId }
        }
      }
    ]
  }
}

Rule collection groups are separate child resources of the policy. Keeping them in the same template means firewall changes go through code review and your pipeline.

Take quiz
Which Bicep resource type holds the firewall's rules and settings?
Microsoft.Network/firewallPolicies
Microsoft.Network/routeTables
Microsoft.Network/dnsZones
Microsoft.Compute/virtualMachines
How does the firewall resource link to its policy?
Through the subnet name
Through the firewallPolicy id property
Through the public IP tag
Automatically by name matching

48. What are the limitations of Azure Firewall?

Azure Firewall is capable, but a few limits are worth knowing before you design around it.

  • IPv4 only. IPv6 traffic is not supported.
  • No NSG on AzureFirewallSubnet, and the subnet is dedicated to the firewall.
  • Application rules cover HTTP, HTTPS and MSSQL. Other protocols use network rules.
  • Standard filters HTTPS by domain only. Full URL paths need Premium with TLS inspection.
  • SNAT ports are finite per public IP, and heavy outbound use may need extra IPs or a NAT gateway.
  • Scale-out takes minutes, so sudden spikes can briefly strain it.
  • FQDN in network rules needs DNS proxy.
  • It is not a WAF, so web application attack protection needs Application Gateway or Front Door.

Check the current service limits page before committing to large rule counts or throughput targets.

Take quiz
Which IP version does Azure Firewall support?
IPv6 only
IPv4 only
Both IPv4 and IPv6 equally
Neither
What should you add for web application attack protection?
A second Azure Firewall
More SNAT ports
Application Gateway WAF or Front Door WAF
An FQDN tag

49. Explain the packet flow of an outbound request through Azure Firewall?

Take a VM in a spoke calling an external HTTPS site. Here is what happens:

sequenceDiagram
  participant VM as Spoke VM
  participant FW as Azure Firewall
  participant Web as Internet Site
  VM->>FW: Request sent via UDR next hop
  FW->>FW: Threat intel check
  FW->>FW: Network rules, then application rules
  FW->>Web: Allowed request, source SNATed to firewall public IP
  Web-->>FW: Response to firewall public IP
  FW-->>VM: Response translated back and returned
  1. The VM's route table sends 0.0.0.0/0 to the firewall's private IP.
  2. The firewall checks threat intelligence, then DNAT, network and application rules in order.
  3. If allowed, it rewrites the source to one of its public IPs and records the session.
  4. The reply arrives at the public IP, matches the session, and is translated back to the VM.

A deny at any stage drops the packet and writes a log entry with the rule that matched.

Take quiz
Which address does the internet site see as the source?
The VM's private IP
The spoke gateway IP
The firewall's public IP
The route table's address
What allows the reply to find its way back to the VM?
A static entry on the web server
The NSG on the VM
The DNS cache
The firewall's stateful session table

50. How do you secure AKS egress with Azure Firewall?

To control outbound traffic from an AKS cluster, route it through the firewall and allow only what the cluster needs.

  1. Put the cluster in a subnet with a route table sending 0.0.0.0/0 to the firewall's private IP.
  2. Create the cluster with --outbound-type userDefinedRouting so AKS does not create its own public egress.
  3. Add an application rule using the AzureKubernetesService FQDN tag for required Microsoft endpoints.
  4. Add network rules for items such as time sync and DNS, and rules for your container registries.
az aks create -g rg-aks -n aks1 --vnet-subnet-id $SUBNET_ID \
  --outbound-type userDefinedRouting

For inbound services exposed through a load balancer, use a DNAT rule, and make sure replies are SNATed to avoid asymmetric routing. Verify the required endpoint list in the current AKS documentation, since it changes.

Take quiz
Which FQDN tag helps allow AKS control plane dependencies?
WindowsUpdate
AzureBackup
Office365
AzureKubernetesService
Which AKS outbound type sends egress through your own firewall?
userDefinedRouting
loadBalancer
managedNATGateway only
none
«
»

Comments & Discussions