Loading...

Exploring Azure Firewall Policy Analytics

Exploring Azure Firewall Policy Analytics

Written in collaboration with @ShabazShaik and @gusmodena.

 

Introduction:

 

Azure Firewall is a cloud-native and intelligent network firewall security service that provides the best of breed threat protection for your cloud workloads running in Azure. It’s a fully stateful firewall with built-in high availability and unrestricted cloud scalability. Multiple customers are looking for a feature that provides a centralized view of the Firewall rules and recommendations based on all the traffic passing through their Firewalls. 

 

In this blog we will discuss in detail about the Policy Analytics which help you with enhanced Logging and Firewall rule management capabilities respectively.

 

Policy Analytics

 

Policy Analytics is a new feature released in Public Preview in July 2022, which provides insights, centralized visibility, and control to Azure Firewall, helping IT teams who have the challenge to keep Firewall rules up to date, manage existing rules, and remove unused rules.

 

You can refine and update Firewall rules and policies with confidence in just a few steps in the Azure portal. You have granular control to define your own custom rules for an enhanced security and compliance posture.

 

Policy Analytics is accessible via Azure portal under Firewall Policy/Monitoring, and the insights tab brings 6 interesting dashboards, aggregating insights, and highlighting relevant policy information.

 

gusmodena_1-1662125257253.png

 

These are the key Policy Analytics features:

 

  • Policy insight panel: Aggregates insights and highlights relevant policy information.
  • Rule analytics: Analyzes existing DNAT, Network, and Application rules to identify rules with low utilization or rules with low usage in a specific time window.
  • Traffic flow analysis: Maps traffic flow to rules by identifying top traffic flows and enabling an integrated experience.
  • Single Rule analysis: Analyzes a single rule to learn what traffic hits that rule to refine the access it provides and improve the overall security posture.

 

To enable Policy Analytics, you must meet the following prerequisites:

 

 

Policy Analytics starts monitoring the flows in the DNAT, Network, and Application rule analysis only after you enable the feature. It can’t analyze rules hit before the feature is enabled. Follow the steps below to enable Policy Analytics:

 

1. Enabling Network Rule Name Logging:

 

To enable the Network Rule name Logging feature, the following commands need to be run in Azure PowerShell. For the feature to immediately take effect, an operation needs to be run on the firewall. This can be a rule change (least intrusive), a setting change, or a stop/start operation. Otherwise, the firewall/s is updated with the feature within several days. Run the following Azure PowerShell commands to configure Azure Firewall network rule name logging:

 

Connect-AzAccount Select-AzSubscription -Subscription "subscription_id or subscription_name" Register-AzProviderFeature -FeatureName "AFWEnableNetworkRuleNameLogging" -ProviderNamespace "Microsoft.Network" Register-AzResourceProvider -ProviderNamespace "Microsoft.Network"

 

2. Enabling Structured Firewall Logs:

 

With this new feature, you'll be able to choose to use Resource Specific Tables instead of the existing AzureDiagnostics table. In case both sets of logs are required, at least two diagnostic settings need to be created per firewall. By default, the new resource specific tables are disabled. Run the following Azure PowerShell commands to enable Azure Firewall Structured logs:

 

Connect-AzAccount Select-AzSubscription -Subscription "subscription_id or subscription_name" Register-AzProviderFeature -FeatureName "AFWEnableStructuredLogs" -ProviderNamespace "Microsoft.Network" Register-AzResourceProvider -ProviderNamespace "Microsoft.Network"

 

3. Enabling Policy Analytics:

 

Firewall with no Diagnostic settings configured:

  • Once all prerequisites are met, select Policy analytics (preview) in the table of contents.
  • Next, select Configure Workspaces.
  • In the pane that opens, select the Enable Policy Analytics checkbox.
  • Next, choose a log analytics workspace. The log analytics workspace should be the same as the Firewall attached to the policy.
  • Select Save after you choose the log analytics workspace.
  • Go to the Firewall attached to the policy and enter the Diagnostic settings page. You'll see the FirewallPolicySetting added there as part of the policy analytics feature.
  • Select Edit Setting, and ensure the Resource specific toggle is checked, and the highlighted tables are checked. In the previous example, all logs are written to the log analytics workspace.

 

Firewall with Diagnostics settings already configured

  • Ensure that the Firewall attached to the policy is logging to Resource Specific tables, and that the following three tables are also selected:
    • AZFWApplicationRuleAggregation
    • AZFWNetworkRuleAggregation
    • AZFWNatRuleAggregation
  • Next, select Policy Analytics (preview) in the table of contents. Once inside the feature, select Configure Workspaces.
  • Now, select Enable Policy Analytics.
  • Next, choose a log analytics workspace. The log analytics workspace should be the same as the Firewall attached to the policy.
  • Select Save after you choose the log analytics workspace.
  • During the save process, you might see the following error message: “Failed to update Diagnostic Settings

 

Exploring Policy Analytics

 

Once all the prerequisites are done and the Diagnostic Setting is created, you will start seeing the dashboards being populated based on the Firewall Policy configuration and the logs available. In the insights tab you’ll find 6 dashboards:

 

  • Policy limits: This dashboard shows the overall limits of your policy as total number of rules, total number of unique source/destinations IPs, total number of IP Groups and DNAT rule limits.

 

gusmodena_0-1662128324859.png

 

  • Rules with multiple IP addresses: Here you will find the rules with multiple IP addresses at source or destination field. The number of IPs which will trigger the recommendations is customizable between 1 and 100.

 

gusmodena_1-1662126315124.png

 

This dashboard helps you identifying what rules may use IP Groups instead of having multiple IP addresses in the source/destination.

 

  • Rules with low utilization: A rule is considered to have low utilization when no hits are observed on some or all matching network flows over a period of time. You can select the time that you would like to use as a basis for generating recommendations.

 

gusmodena_3-1662126405027.png

 

  • Duplicate Rules: This dashboard is customizable, and you may select the following options to show recommendations for:
    • Two or more rules with exactly same values for all the parameters (except name)
    • Two or more rules where the source or destination of one fully contains the others, and all other rule parameters match (except name)
    • One rule with duplicate sources or duplicate destinations

 

By selecting “See recommendations” you’ll find details of duplicated IP addresses and redundant rules.

 

gusmodena_0-1662128087605.png

 

  • Generic rules: Here you will learn what rules are using wildcard as source or destination IP addresses. By selecting “See recommendations” you will see what rules those are and what is the recommended action.

 

gusmodena_0-1662126608836.png

You can also click at the recommended action to run the single rule analysis.

 

  • Potentially malicious sources: This dashboard shows traffic from malicious sources that are triggering Threat Intelligence and/or IDPS logs. By selecting “See recommendations” you will learn what action is recommended to prevent against potential threat detected.

 

gusmodena_1-1662126701383.png

 

Policy Analytics also provides visibility of all your DNAT, Network and Application rules in 3 different tabs. In these tabs you will see a column called “Matching flows” which shows you the total number of flows for each rule in a period of time.

 

gusmodena_3-1662126766963.png

 

The Traffic flows tab will give you more details of each flow like Rule Name, Source, Destination, Port, Protocol, Hit count and others. You can also change the filter to show the data for 10 min up to 30 days.

 

gusmodena_4-1662126843571.png

 

The last tab is for Single-rule analysis that can be used to analyze a rule and to learn what traffic hits that rule to refine the access it provides and improve the overall security posture. After running the analysis, you will find a rule summary and you will also be able to apply changes on the Port, Protocol, Source and/or Destination, delete the rule or move the rule to a lowest priority collection group.

 

gusmodena_5-1662126890018.png

 

Enabling Policy Analytics on a Firewall Policy associated with a single firewall is billed per policy as described on the Azure Firewall Manager pricing page. Enabling Policy Analytics on a Firewall Policy associated with more than one firewall is offered at no additional cost.

 

Conclusion:

 

As you have seen above, Azure Firewall Policy Analytics simplifies firewall policy management by providing insights and a centralized view to help IT teams to have better and consistent control of Azure Firewall.

Published on:

Learn more
Need help with this product?

We can help you with Exploring Azure Firewall Policy Analytics

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Azure Network Security Blog articles
Azure Network Security Blog articles

Azure Network Security Blog articles

Share post:

Related posts

IPv6 Adoption: Enhancing Azure WAF on Front Door

The transition to IPv6 is a significant step for enterprise corporations, reflecting the evolution of internet technology and the need for a l...

1 year ago

Azure WAF’s Bot Manager 1.1 and JavaScript Challenge (Preview): Navigating the Bot Threat Terrain

Introduction   Bots are a common presence on the internet, serving a range of functions from automating customer service to indexing page...

1 year ago

Private IP DNAT Support (Preview) and Scenarios with Azure Firewall

Introduction Azure Firewall is a cloud native security service to protect your workloads running in Azure. It is a stateful firewall as a serv...

1 year ago

Getting Started with Azure DDoS Protection REST API: A Step-by-Step Guide

REST API is a cornerstone in the management of resources on Azure, providing a streamlined and efficient approach for executing create, read, ...

1 year ago

Monitoring Azure DDoS Protection Mitigation Triggers

Monitoring Azure DDoS Protection Mitigation Triggers In today’s digital landscape, Distributed Denial of Service (DDoS) attacks pose a signifi...

1 year ago

Azure WAF’s Bot Manager 1.1 and JavaScript Challenge: Navigating the Bot Threat Terrain

Introduction   Bots are a common presence on the internet, serving a range of functions from automating customer service to indexing page...

1 year ago

Utilizing Azure DDoS Protection Workbook for DDoS attack traffic Analysis

In today's digital age, the security of applications, servers, and networks is paramount. One of the most significant threats to this security...

1 year ago

Independent Configuration of Size Enforcement and Inspection Limits in Application Gateway WAF

Introduction   In the constantly changing world of cybersecurity, both flexibility and effective security are essential for safeguarding ...

1 year ago

Private IP DNAT Support and Scenarios with Azure Firewall

Introduction Azure Firewall is a cloud native security service to protect your workloads running in Azure. It is a stateful firewall as a serv...

1 year ago

Monitoring traffic flows in Azure Firewall using Virtual Network Flow Logs

Azure Firewall is a managed service designed to protect your Azure Virtual Network resources, providing advanced threat protection and advance...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.