Azure Firewall Policy Overview

This article provides an overview of Azure Firewall policies, a centralized way to manage firewall rules across your Azure Firewall instances. Azure Firewall policies offer a structured and scalable approach to defining and enforcing network security rules.

What is an Azure Firewall Policy?

An Azure Firewall Policy is a container for all your firewall rules. It allows you to group and manage Network Rules, Application Rules, and DNAT Rules in a centralized location. This policy is then associated with one or more Azure Firewall instances, ensuring consistent security enforcement across your network infrastructure.

Key Components of a Firewall Policy

Benefits of Using Firewall Policies

Creating and Managing Firewall Policies

You can create and manage Azure Firewall Policies using the Azure portal, Azure CLI, Azure PowerShell, or REST APIs.

Using the Azure Portal

  1. Navigate to the Azure portal and search for "Firewall Policies".
  2. Click "Create firewall policy".
  3. Fill in the required details, including the policy name, resource group, and region.
  4. Define your Rule Collection Groups and the rules within them.
  5. Associate the policy with your Azure Firewall instance(s).
Note: When creating a new firewall, you can choose to create a new policy or associate an existing one.

Example: Allowing Web Traffic

Here's a simplified example of an Application Rule Collection that allows outbound HTTP and HTTPS traffic to specific web servers:


{
  "ruleCollectionGroupName": "AppRuleCollectionGroup",
  "ruleCollections": [
    {
      "ruleCollectionType": "ApplicationRuleCollection",
      "name": "AllowSpecificWebsites",
      "priority": 200,
      "action": {
        "type": "Allow"
      },
      "rules": [
        {
          "name": "AllowExample.com",
          "protocols": [
            { "protocolType": "Http", "port": 80 },
            { "protocolType": "Https", "port": 443 }
          ],
          "sourceAddresses": [ "*" ],
          "targetFqdns": [ "www.example.com" ]
        }
      ]
    }
  ]
}
            
Tip: For best practices, always use specific FQDNs or IP addresses in your target rules rather than wildcards whenever possible.

Associated Concepts