Azure Firewall

Last updated: October 26, 2023

On this page

Introduction to Azure Firewall

Azure Firewall is a cloud-native and intelligent network security service that protects your Azure Virtual Network resources. It's a fully stateful firewall as a service with built-in high availability and unrestricted cloud scalability.

Azure Firewall uses a static public IP address for your virtual network resources, allowing external clients to connect to your services. It provides central network security policy enforcement and threat intelligence that can block known malicious IP addresses and domains.

Azure Firewall High-Level Architecture

Key Features

Architecture Overview

Azure Firewall is deployed in a dedicated subnet called AzureFirewallSubnet within your virtual network. It acts as a central network security hub, inspecting traffic between your subnets and between your virtual network and the internet.

It can be deployed in hub-and-spoke or VNet-peered architectures. In a hub-and-spoke topology, Azure Firewall in the hub VNet can protect resources in multiple spoke VNets.

Components:

Deployment and Configuration

Deploying Azure Firewall can be done through the Azure portal, Azure CLI, PowerShell, or ARM templates.

Key steps typically include:

  1. Creating a dedicated subnet named AzureFirewallSubnet in your virtual network.
  2. Deploying the Azure Firewall resource into this subnet.
  3. Configuring route tables to force network traffic through the Azure Firewall.
  4. Defining Firewall Policies with Network, Application, and DNAT rules.

Example: Creating a Network Rule using Azure CLI


az network firewall network-rule create \
    --collection-name AllowDns \
    --name Allow-Google-DNS \
    --firewall-name MyFirewall \
    --resource-group MyResourceGroup \
    --rule-type Network \
    --protocols TCP UDP \
    --source-addresses '*' \
    --destination-addresses '8.8.8.8' \
    --destination-ports '53'
            
Note: Ensure your subnet size is appropriately planned for Azure Firewall. A /26 or larger is recommended.

Management and Monitoring

Azure Firewall integrates seamlessly with Azure Monitor and Azure Sentinel for comprehensive logging, alerting, and analysis.

You can view firewall logs, analyze traffic patterns, and set up alerts for suspicious activities directly within the Azure portal.

Log Categories:

Tip: Configure diagnostic settings to send logs to a Log Analytics workspace for advanced querying and visualization.

Common Use Cases

  • Centralized Network Security: Enforcing consistent security policies across multiple VNets in a hub-and-spoke topology.
  • Protecting PaaS Services: Securing access to PaaS services like Azure SQL Database or Azure Storage from within your VNet.
  • Web Filtering: Controlling outbound web access by allowing or denying specific websites or categories of websites.
  • Threat Protection: Blocking connections to known command-and-control servers or malicious websites.
  • Secure Remote Access: Enabling secure inbound access to specific applications through DNAT rules.

Next Steps

Ready to implement Azure Firewall in your environment?