Understanding Azure Firewall
This lesson explains what Azure Firewall adds to NSGs, how to choose a tier, and how it is deployed.
Learning outcomes
After completing this lesson, you will be able to:
- Explain why a firewall needs routes.
- Choose a firewall tier.
- Describe IDPS and TLS inspection.
- Explain forced tunnelling.
What Azure Firewall adds
Azure Firewall is a managed network firewall with built-in high availability and scaling. It complements NSGs. An NSG filters at the level of a subnet or NIC, and it is often owned by a local team. A firewall sits at a central point, and inspects traffic on its way between networks. It can filter by fully qualified domain name, use threat intelligence, and log all decisions in one place.
The firewall does nothing unless traffic reaches it. A deployment therefore has two parts: the firewall itself, in a subnet named AzureFirewallSubnet, and routes that send traffic to it. A UDR with the next hop type of Virtual appliance points the default route, 0.0.0.0/0, to the firewall's private address.
Choosing a tier
Azure Firewall comes in three tiers. Exam scenarios usually state a feature that identifies the tier. The following comparison shows the differences.
A firewall that filters by FQDN in application rules sees only the name in the TLS handshake, known as the Server Name Indication. It does not see the path of a URL. Filtering on a full URL, such as www.contoso.com/secure/, needs TLS inspection, and that needs Premium.
Which firewall tier?
IDPS and TLS inspection
An intrusion detection and prevention system (IDPS) looks for known attack signatures in traffic. In Azure Firewall Premium, it has three modes: Off, Alert, and Alert and Deny. Most internet traffic is encrypted, so signature matching sees little unless the traffic can be decrypted.
TLS inspection solves this. The firewall ends the client's TLS connection using an intermediate certificate authority certificate, stored in Key Vault, inspects the content, and then starts a new connection to the destination. Clients must trust that certificate, which is why TLS inspection needs a private certificate authority trusted by the managed devices. The firewall needs a managed identity that has access to the vault. Some traffic should be exempted, such as banking or health sites for privacy reasons, or applications that pin a certificate.
Inbound TLS termination is handled differently: Azure Application Gateway performs it, with the firewall placed behind it. A scenario that asks for inspection of encrypted inbound web traffic usually involves Application Gateway.
TLS inspection
Forced tunnelling and availability
Some organizations must send all internet-bound traffic to an on-premises device. Forced tunnelling supports this, and it needs a management NIC, in a subnet named AzureFirewallManagementSubnet, so that the firewall can reach its own management traffic independently. It must be configured at deployment. Azure Firewall spans availability zones when it is deployed that way, and it can scale without any action.
Azure Firewall resources should send logs to a Log Analytics workspace through a diagnostic setting. Structured logs include application rule, network rule, threat intelligence and IDPS records. The Azure Firewall solution in Microsoft Sentinel provides workbooks and detections.
Deploying a firewall
The following outline gives the deployment sequence for a hub network.
-
Prepare the subnet
Create AzureFirewallSubnet, with a size of at least /26.
-
Deploy
Create the firewall with a static Standard public IP address, and attach a firewall policy.
-
Route
Create a route table with 0.0.0.0/0 pointing to the firewall's private address, and associate it with workload subnets.
-
Add rules
Add rule collections to the policy.
-
Log
Send logs to a workspace, and test the flows.
Deploying a hub firewall
Selecting a tier
A healthcare company needs to detect and block known malware signatures in outbound HTTPS traffic from servers, and to allow access only to specific URL paths on vendor sites. Which tier and features should it deploy?
Signature detection needs IDPS, and inspection of encrypted content needs TLS inspection. Matching URL paths also needs TLS inspection, since application rules otherwise see only the FQDN. All of these point to Azure Firewall Premium, with an intermediate CA certificate in Key Vault that the servers trust.
Standard offers threat intelligence and FQDN filtering, but no IDPS, and it could not see URL paths. A WAF protects inbound web applications and not outbound server traffic.
Without TLS inspection, what can an application rule see of an HTTPS request?
Show answer
The FQDN from the Server Name Indication, but not the URL path.
Exam Tips
Remember for the exam
- A firewall needs UDRs, or traffic never reaches it.
- IDPS, TLS inspection and URL paths all need Premium.
- Basic only alerts on threat intelligence.
- TLS inspection needs a trusted intermediate CA certificate in Key Vault.