Back to Blog

Azure Firewall Premium: TLS Inspection, IDPS and Threat Intel

Complete AZ-104 tutorial on Firewall & NAT Gateway. Learn TLS inspection, intrusion detection and prevention, DNAT/SNAT policies, logging.

Azure Firewall Premium: TLS Inspection, IDPS and Threat Intel

Azure Firewall Premium: TLS Inspection, IDPS, and Threat Intelligence

Introduction

Azure Firewall Premium is an advanced cloud-native network security service designed to protect your Azure workloads from sophisticated threats. With features such as TLS Inspection, Intrusion Detection and Prevention Systems (IDPS), and enhanced Threat Intelligence, it provides a robust defense against cyber threats. Understanding Azure Firewall Premium is critical for the AZ-104 exam, especially for candidates focusing on networking security.

Organizations face increasing challenges from encrypted traffic, making it essential to inspect TLS/SSL communications without compromising performance. Azure Firewall Premium addresses this need by allowing administrators to decrypt, inspect, and re-encrypt traffic, thus ensuring malicious content is detected before it reaches its destination.

Key scenarios include protecting sensitive data in regulated industries, monitoring for malicious activities, and controlling access to resources through dynamic rule sets. The comprehensive features of Azure Firewall Premium make it indispensable for modern security architectures.

Prerequisites

Before diving into Azure Firewall Premium, ensure you meet the following prerequisites:

  1. Azure Subscription: A valid Azure subscription is needed to deploy Azure Firewall Premium.

  2. RBAC Permissions: Ensure you have the necessary roles assigned, such as Owner or Contributor on the resource group.

  3. Tools:

    • Azure CLI: Install the Azure CLI for command-line management.
    • Azure PowerShell: Can be used for automation and scripting.
    • Azure Portal: For graphical interface management.
  4. Services Enabled: Ensure your Azure environment is set up with Virtual Networks (VNets) and the necessary subnets to deploy the Azure Firewall.

Core Concepts

Definitions

  • TLS Inspection: A process that allows firewalls to decrypt and inspect encrypted traffic to identify potential threats.
  • Intrusion Detection and Prevention System (IDPS): Monitors network traffic for suspicious activity and can take action if threats are detected.
  • Threat Intelligence: Data collected from various sources about potential threats which can be used to enhance security measures.

Architecture

Azure Firewall Premium is deployed within a Virtual Network. It integrates with Azure Monitor for logging and analytics, making it suitable for monitoring traffic patterns and detecting anomalies. The architecture allows for both north-south (internet to Azure) and east-west (Azure to Azure) traffic inspection.

When to Use

  • Sensitive Data Protection: In industries like finance and healthcare where data protection is paramount.
  • Malware Prevention: Utilizing IDPS to detect and prevent malware before it infiltrates the network.
  • Compliance Requirements: Meeting regulatory requirements for data security and traffic inspection.

Limitations

  • Performance Overhead: Enabling TLS inspection may introduce latency in traffic processing.
  • Complex Configuration: Requires careful planning to implement effectively without disrupting normal operations.

Pricing Notes

Azure Firewall Premium is billed based on the amount of data processed and the provisioned infrastructure. Familiarize yourself with the Azure Pricing Calculator for accurate budgeting.

Syntax/Configuration

Azure CLI Commands

  1. Create Azure Firewall:

    az network firewall create --name MyFirewall --resource-group MyResourceGroup --location eastus --sku Premium
    
  2. Configure TLS Inspection:

    az network firewall policy rule-collection-group collection rule add --policy-name MyFirewallPolicy --resource-group MyResourceGroup --rule-collection-group-name MyRuleCollectionGroup --name MyRule --action Allow --priority 100 --rule-type ApplicationRule --target-fqdns www.example.com --protocols Http
    
  3. Enable IDPS:

    az network firewall policy idps update --policy-name MyFirewallPolicy --resource-group MyResourceGroup --enabled true
    
  4. Add Diagnostic Settings:

    az monitor diagnostic-settings create --resource MyFirewall --resource-group MyResourceGroup --resource-type 'Microsoft.Network/azureFirewalls' --workspace MyLogAnalyticsWorkspace --logs '[{"category": "AzureFirewallApplicationRule", "enabled": true},{"category": "AzureFirewallNetworkRule", "enabled": true}]'
    

Azure Portal Steps

  1. Create Azure Firewall:

    • Navigate to Create a resource > Networking > Firewall.
    • Set the SKU to Premium.
    • Configure the virtual network and subnets.
  2. Configure TLS Inspection:

    • In the Azure Firewall settings, select TLS settings and enable TLS inspection.
  3. Set Up IDPS:

    • Go to the Firewall policy, select IDPS, and enable it.
Parameter Description
--name Name of the firewall
--resource-group Resource group to place the firewall
--sku SKU type (Basic, Standard, Premium)
--enabled Enable or disable IDPS

Practical Examples

Basic Examples

  1. Creating a Basic Firewall:

    az network firewall create --name BasicFirewall --resource-group MyResourceGroup --location eastus --sku Standard
    
  2. Enabling TLS Inspection:
    Configure TLS Inspection to inspect web traffic:

    az network firewall tls-inspection add --firewall-name MyFirewall --resource-group MyResourceGroup
    
  3. Creating Application Rules:
    Add an application rule to allow web traffic:

    az network firewall policy rule-collection-group collection rule add --policy-name MyPolicy --resource-group MyResourceGroup --rule-collection-group-name MyRuleGroup --name MyWebRule --action Allow --priority 100 --rule-type ApplicationRule --target-fqdns www.example.com --protocols Http
    

Advanced Examples

  1. Setting Up IDPS Signature Rules:
    Add a custom signature rule to block specific traffic:

    az network firewall policy idps signature add --policy-name MyFirewallPolicy --resource-group MyResourceGroup --signature-id 2032081 --mode Deny
    
  2. Logging Configuration:
    Setup logging for Azure Firewall:

    az monitor diagnostic-settings create --resource MyFirewall --resource-group MyResourceGroup --resource-type 'Microsoft.Network/azureFirewalls' --workspace MyLogAnalyticsWorkspace --logs '[{"category": "AzureFirewallApplicationRule", "enabled": true},{"category": "AzureFirewallNetworkRule", "enabled": true}]'
    
  3. Creating Web Categories:
    Define a category to block specific URLs:

    az network firewall policy web-category add --policy-name MyPolicy --resource-group MyResourceGroup --category-name "Social Media" --action Deny
    
  4. Testing IDPS:
    Deploy a test server and simulate an attack:

    curl -A "HaxerMen" http://<your-test-server>
    
  5. Monitoring Traffic:
    Use Azure Monitor to visualize firewall activities:

    az monitor activity-log list --resource-group MyResourceGroup --start-time <start_time> --end-time <end_time>
    

Real-World Scenarios

Scenario 1: Ransomware Protection

In a financial institution, Azure Firewall Premium's IDPS detects an attempt to connect to a known Command and Control (C&C) server, blocking the malware from encrypting sensitive data.

Scenario 2: Regulatory Compliance

A healthcare provider uses TLS Inspection to ensure that all encrypted traffic is scanned for threats, adhering to HIPAA compliance requirements while protecting patient data.

Scenario 3: Multi-Region Deployment

An international e-commerce platform deploys Azure Firewall Premium across multiple regions to ensure that all traffic, both internal and external, is monitored and controlled, providing a unified security stance globally.

Best Practices

  1. Regularly Update Firewall Rules: Keep all threat intelligence and rules updated to respond to new threats.
  2. Utilize Diagnostic Logging: Enable and analyze diagnostic logs to track and respond to suspicious activities.
  3. Monitor Performance: Regularly review the performance of the firewall to ensure it meets organizational needs without introducing latency.
  4. Conduct Regular Security Audits: Perform security assessments to identify potential vulnerabilities and improve configurations.
  5. Implement Network Segmentation: Use Azure Firewall to segment networks and limit lateral movement within the environment.

Common Errors

  1. Error: "Invalid TLS certificate"

    • Cause: The TLS certificate used for inspection is invalid.
    • Fix: Ensure the correct certificate is uploaded to Azure Key Vault.
  2. Error: "IDPS alert with incorrect source IP"

    • Cause: IDPS may show internal IP addresses instead of the actual source IP.
    • Fix: Check the configuration of IDPS settings.
  3. Error: "Firewall Policy not applied"

    • Cause: The policy may not be correctly associated with the firewall.
    • Fix: Verify that the policy is linked to the firewall within the Azure Portal.
  4. Error: "Insufficient permissions"

    • Cause: The user lacks the necessary permissions to modify firewall settings.
    • Fix: Grant the appropriate roles to the user.

Related Services/Commands

Service/Command Description
Azure DDoS Protection Provides protection against Distributed Denial of Service attacks.
Azure Web Application Firewall (WAF) Protects web applications from common threats and vulnerabilities.
az network firewall policy Manages firewall policies for Azure Firewall.
az monitor diagnostic-settings Configures diagnostic settings for monitoring and logging.

Automation Script

# Azure Firewall Premium Setup Script
# This script automates the creation of Azure Firewall Premium with TLS Inspection and IDPS enabled.

# Variables
$resourceGroupName = "MyResourceGroup"
$location = "East US"
$firewallName = "MyPremiumFirewall"
$policyName = "MyFirewallPolicy"
$workspaceName = "MyLogAnalyticsWorkspace"

# Create Resource Group
az group create --name $resourceGroupName --location $location

# Create Firewall Premium
az network firewall create --name $firewallName --resource-group $resourceGroupName --location $location --sku Premium

# Create Firewall Policy
az network firewall policy create --name $policyName --resource-group $resourceGroupName --location $location --sku Premium

# Enable TLS Inspection
az network firewall policy tls-inspection add --policy-name $policyName --resource-group $resourceGroupName

# Add Diagnostic Settings
az monitor diagnostic-settings create --resource $firewallName --resource-group $resourceGroupName --resource-type 'Microsoft.Network/azureFirewalls' --workspace $workspaceName --logs '[{"category": "AzureFirewallApplicationRule", "enabled": true},{"category": "AzureFirewallNetworkRule", "enabled": true}]'

# Output completion message
Write-Host "Azure Firewall Premium setup completed."

Conclusion

Azure Firewall Premium is a critical component for securing Azure workloads, particularly in environments where sensitive data requires stringent protection measures. Understanding its features, such as TLS Inspection and IDPS, equips Azure Administrators with the skills needed for the AZ-104 exam and beyond.

Next steps include practicing with Azure Firewall in a lab environment, exploring advanced configurations, and integrating Azure Firewall with Azure Monitor and Microsoft Sentinel for comprehensive security monitoring.

References