azure network security
181 TopicsShare Your Expertise: Help Shape Our Network Practitioner Community
Hello Azure network practitioners, We’re working on refining our understanding of network practitioner personas and building stronger community engagement strategies for networking practitioners. Your insights as an MVP are invaluable to this effort. Could you take a few minutes to complete this short survey? Your feedback will directly influence how we design future programs and resources for the community. 👉 https://forms.office.com/r/dfgXxNwQd9 Thank you for helping us make the Azure networking community even better! Best regards, Dan Product Marketing Manager, Identity & Network Access Growth15Views0likes0CommentsGetting Started with Azure Firewall REST API – Part II
In Part I of this series, we explored how to interact with Azure’s REST APIs using Bruno. We laid the foundation for provisioning and managing Azure Firewall using REST API, covering the core setup tasks such as creating the firewall instance, defining policies, and implementing basic rule configurations. In Part II, we take a step forward by diving into advanced configurations that are crucial for securing complex, large-scale environments. These configurations allow you to fine-tune traffic control, improve security posture, and enhance visibility into network activities. In this part, we’ll cover: Initial setup: Authentication and prerequisites Creating DNAT Rules to expose internal resources securely Enabling IDPS (Intrusion Detection and Prevention System) with Signature Overrides and Bypass Rules Using Web Categories to simplify and strengthen application rule Creating FQDN Filtering Rules to allow or deny traffic based on domain names Creating URL Filtering Rules to allow or deny traffic based on URLs Associating Multiple Public IPs with Azure Firewall for better scalability Enabling Diagnostic Settings for detailed logging and monitoring Customizing SNAT Private IP Address Ranges for precise outbound traffic control By the end of this part, you'll have a deeper understanding of how to leverage Azure Firewall’s full potential to meet real-world enterprise security needs— using REST API. Initial Setup: Authentication and Prerequisites: After downloading and setting up Bruno as the REST API client, creating a new collection as described in Part I, you will do the following: Service Principal Creation: Using Azure CLI, create a Service Principal in the correct subscription as shown below: az ad sp create-for-rbac --name "BrunoClient" --role Contributor --scopes /subscriptions/{subscription-id} Make a note of the following: App ID (client_id) Tenant ID Password (client_secret) Request a Bearer Token: Using BRUNO, get the Bearer Token using the following PUT request and details we derived from the above Service Principal Creation. POST: https://login.microsoft.com/{TenantID}/oauth2/token Body (x-www-form-urlencoded): grant_type: client_credentials client_id: {App ID} client_secret: {Password} resource: https://management.azure.com Add Authorization Header for API Requests: Once you get the Bearer Token, you need to add this to every Request as shown below: We also need to refresh the Bearer Token each time it expires and update it in the Token field for every request. Typically, it expires every 1 hour, however, the exact expiration time can vary depending on the API and its configuration. Get Your Subscription ID: Retrieve the Subscription ID for the Azure subscription where your Azure Firewall instance is deployed Using AZ CLI, get the Subscription ID to be used in the API requests: az account show --query id -o tsv Azure Firewall Configurations via REST API: In Part I of this series, we discussed how to use REST API to configure the Azure Firewall resource and the Firewall Policy. Now, let's delve into the advanced features. Configuring DNAT Rule: This example demonstrates how to configure a DNAT (Destination Network Address Translation) rule using Azure Firewall's REST API. It uses the 'FirewallPolicyNatRuleCollection' type to redirect traffic from a public IP and port to an internal FQDN and port. Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{Resourcegroupname}/providers/Microsoft.Network/firewallPolicies/{FirewallPolicyName}/ruleCollectionGroups/{RuleCollectionName}?api-version=2024-05-01 Request Body: { "properties": { "priority": 100, "ruleCollections": [ { "ruleCollectionType": "FirewallPolicyNatRuleCollection", "priority": 100, "name": "Example-Nat-Rule-Collection", "action": { "type": "DNAT" }, "rules": [ { "ruleType": "NatRule", "name": "nat-rule1", "translatedFqdn": "internalhttp.server.net", "translatedPort": "8080", "ipProtocols": [ "TCP", "UDP" ], "sourceAddresses": [ "2.2.2.2" ], "sourceIpGroups": [], "destinationAddresses": [ "{Firewall IP}" ], "destinationPorts": [ "8080" ] } ] } ] } } When the PUT request is successful, the following rule is created under DNAT Rule Collection Group as shown below: Enabling Intrusion Detection (IDPS): When using Azure Firewall Premium, enabling Intrusion Detection and Prevention (IDPS) helps monitor, detect and respond to suspicious activities, enhancing security. Below is a simple example that shows how to use the PUT method to update your Firewall policy with an IDPS configuration such as enabling it, applying signature overrides and bypassing certain trusted traffic from the IDPS rules. 💡 Note: Make sure your Azure Firewall SKU is Premium, as IDPS is only available in that tier. Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups//{Resourcegroupname}/providers/Microsoft.Network/firewallPolicies//{FirewallPolicyName}?api-version=2024-05-01 Request Body: { "tags": { "key1": "value1" }, "location": "westus", "properties": { "threatIntelMode": "Alert", "threatIntelWhitelist": { "ipAddresses": [], "fqdns": ["*.microsoft.com"] }, "snat": { "privateRanges": ["IANAPrivateRanges"] }, "sql": { "allowSqlRedirect": true }, "sku": { "tier": "Premium" }, "intrusionDetection": { "mode": "Alert", "configuration": { "signatureOverrides": [ { "id": "2000105", "mode": "Off" } ], "bypassTrafficSettings": [ { "name": "BypassCustomRule1", "protocol": "TCP", "sourceAddresses": ["192.168.1.0/24"], "destinationAddresses": ["10.1.1.4"], "destinationPorts": ["443"] } ] } } } } When the PUT request is successful, IDPS is enabled in Alert mode (you can also set it to Alert & Deny if needed) as shown below. In this example: Signature ID 2000105 is overridden and set to Off, which appears as Disabled in the Azure Portal. A custom bypass rule is configured to exclude specific traffic (based on source IP, destination IP, and port) from IDPS filtering. This configuration provides flexibility to fine-tune your threat detection settings while allowing exception/safe traffic to pass without inspection. Creating Web Categories Rule: Azure Firewall supports filtering outbound web traffic based on web categories, allowing administrators to block or allow access to entire categories of websites (e.g., Social Networking, Gambling, Adult Content). This provides a scalable way to enforce corporate internet usage policies without needing to specify individual domains. 💡 Note: While this feature is available in both Azure Firewall Standard and Premium, the Premium SKU offers more granular control by matching categories based on the entire URL for both HTTP and HTTPS traffic. Below is an example of how to configure a web category-based application rule using REST API: Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{Resourcegroupname}/providers/Microsoft.Network/firewallPolicies/{FirewallPolicyName}/ruleCollectionGroups/{RuleCollectionName}?api-version=2024-05-01 Request Body: Request Body: { "properties": { "priority": 200, "ruleCollections": [ { "name": "WebCategoryRuleCollection1", "ruleCollectionType": "FirewallPolicyFilterRuleCollection", "priority": 200, "action": { "type": "Deny" }, "rules": [ { "ruleType": "ApplicationRule", "name": "blockWebCategories", "description": " Block social networking and travel-related websites", "protocols": [ { "protocolType": "Https", "port": 443 }, { "protocolType": "Http", "port": 80 } ], "sourceAddresses": [ "10.0.0.0/24" ], "webCategories": [ "SocialNetworking", "Travel" ] } ] } ] } } When this PUT request is successful, the rule denies outbound traffic to websites categorized under Social Networking and Travel from the source IP address range 10.0.0.0/24, for both ports 80 & 443 as shown below: Creating FQDN Filtering Rule: In many enterprise scenarios, it’s important to control which websites users can access. Azure Firewall supports FQDN-based application rules that allow you to filter outbound traffic based on fully qualified domain names (FQDNs), such as www.instagram.com or www.expedia.com. These rules work by inspecting the Server Name Indication (SNI) field during the TLS handshake (for HTTPS traffic) or the Host header in HTTP requests. This makes it possible to apply access control without decrypting the full traffic stream — which means FQDN filtering works even without TLS inspection and is supported in both Standard and Premium SKUs. Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{Resourcegroupname}/providers/Microsoft.Network/firewallPolicies/{FirewallPolicyName}/ruleCollectionGroups/{RuleCollectionName}?api-version=2024-05-01 Request Body: { "properties": { "priority": 100, "ruleCollections": [ { "name": "AppRuleCollection1", "ruleCollectionType": "FirewallPolicyFilterRuleCollection", "priority": 100, "action": { "type": "Deny" }, "rules": [ { "ruleType": "ApplicationRule", "name": " blockSpecificFQDNs", "description": " Block specific websites by FQDN", "protocols": [ { "protocolType": "Https", "port": 443 } ], "sourceAddresses": [ "10.0.0.0/24" ], "targetFqdns": [ "www.instagram.com", "www.expedia.com" ] } ] } ] } } Creating URL Filtering Rule: If you want to control not just which domains users can access, but also specific URLs or paths within those domains, you can use the URL filtering capabilities. To enable this, you must turn on TLS inspection. With HTTPS traffic, only the domain name (e.g., example.com) is visible during the TLS handshake via SNI (Server Name Indication). The full URL path (e.g., /downloads/malware.exe) remains encrypted. To inspect it, the firewall must decrypt the traffic, apply your rules, and then re-encrypt it before forwarding it to the destination. This capability gives you granular control for scenarios like: Blocking access to specific file download paths Restricting parts of websites while allowing others Enforcing strict security policies without over blocking 💡 Note: URL path-based filtering is available only in Azure Firewall Premium. 💡 Note: Ensure TLS inspection is enabled for URL filtering to work on HTTPS traffic. Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{Resourcegroupname}/providers/Microsoft.Network/firewallPolicies/{FirewallPolicyName}/ruleCollectionGroups/{ApplicationRuleCollectionName}?api-version=2024-05-01 Request Body: Request Body: { "properties": { "priority": 100, "ruleCollections": [ { "name": "AppRuleCollection1", "ruleCollectionType": "FirewallPolicyFilterRuleCollection", "priority": 100, "action": { "type": "Deny" }, "rules": [ { "ruleType": "ApplicationRule", "name": " blockSpecificURLs", "description": " Block specific websites by FQDN", "protocols": [ { "protocolType": "Https", "port": 443 } ], "sourceAddresses": [ "10.0.0.0/24" ], "terminateTLS": true, "targetUrls": [ "www.example.com/downloads/malware.exe", "www.example.com/blockedpath/"] } ] } ] } } When this PUT request is successful, the following rule will be created to block access to the specified target FQDNs from the 10.0.0.0/24 source IP address range, as shown below: Associating Multiple Public IP’s: When managing Azure Firewall at scale, assigning multiple public IP addresses can help support higher availability and throughput, especially for SNAT or DNAT scenarios. We will walk through how to use the PUT method in Azure Firewall's REST API to deploy and associate multiple IP configurations efficiently. 💡 Note: When configuring multiple public IP addresses, ensure that you use Standard SKU public IP addresses, as Basic SKU public IPs are not supported with Azure Firewall. 💡 Note: Associating multiple public IP addresses with your firewall increases the available SNAT ports, enhancing scalability. Request: PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/azureFirewalls/{FirewallName}?api-version=2023-05-01 Request Body: { "location": "westus", "properties": { "ipConfigurations": [ { "name": "ipConfig1", "properties": { "publicIPAddress": { "id": "/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/ providers/Microsoft.Network/publicIPAddresses/{PublicIPName} " }, "subnet": { "id": "/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Network/virtualNetworks/{VnetName}/subnets/{SubnetName}" } } }, { "name": "ipConfig2", "properties": { "publicIPAddress": { "id": "/subscriptions/{SubscriptionID}/resourceGroups/{ResourceGroupName}/ providers/Microsoft.Network/publicIPAddresses/{PublicIPName} " } } } ] } } When this PUT request is successful, the specified public IP addresses will be associated with the Azure Firewall, as shown below: Enable Diagnostic Logging: Using the REST API, you can configure Azure Firewall to capture important log categories such as Application Rules, Network Rules, and DNS Proxy logs, as well as performance metrics and more. 💡 Note: A Log Analytics workspace must be set up beforehand to store the logs generated by the API configuration below. Below is an example of how to set up diagnostic settings by linking the firewall to a Log Analytics workspace: Request: PUT https://management.azure.com/subscriptions/{Subscription ID}/resourceGroups/{ResourceGroupName} /providers/Microsoft.Network/azureFirewalls/{FirewallName} /providers/microsoft.insights/diagnosticSettings/{DiagnosticsSettingsName}?api-version=2021-05-01-preview Request Body: { "properties": { "workspaceId": "/subscriptions/{SubscriptionID}/resourceGroups/{Resourcegroupname}/providers/Microsoft.OperationalInsights/workspaces/FirewallLogs", "logs": [ { "category": "AzureFirewallApplicationRule", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } }, { "category": "AzureFirewallNetworkRule", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } }, { "category": "AzureFirewallDnsProxy", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } } ], "metrics": [ { "category": "AllMetrics", "enabled": true, "retentionPolicy": { "enabled": false, "days": 0 } } ], "logAnalyticsDestinationType": "Dedicated" } } When the PUT request is successful, the following logs and metrics will be enabled, and these logs will be sent to the Log Analytics Workspace specified here: Configuring SNAT Exclusions: Azure Firewall provides SNAT capability for all outbound traffic to public IP addresses. If your organization uses registered IP address ranges outside of IANA RFC 1918 or IANA RFC 6598 for private networks, Azure Firewall SNATs the traffic to one of the firewall's private IP addresses in AzureFirewallSubnet. You can configure Azure Firewall to not SNAT your public IP address range. For example, specify an individual IP address as x.x.x.x or a range of IP addresses as x.x.x.x/24. Below is an example of how to configure SNAT exclusions using REST API: Request PUT https://management.azure.com/subscriptions//{Subscription ID}/resourceGroups//{ResourceGroupName} /providers/Microsoft.Network/firewallPolicies/ {FirewallPolicyName}?api-version=2024-05-01 Request Body: { "tags": { "key1": "value1" }, "location": "westus", "properties": { "threatIntelMode": "Alert", "threatIntelWhitelist": { "ipAddresses": [ ], "fqdns": [ "*.microsoft.com" ] }, "snat": { "privateRanges": [ "1.2.3.4", "5.6.7.8”, "IANAPrivateRanges" ] }, "sql": { "allowSqlRedirect": true }, "sku": { "tier": "Premium" } } } When this PUT request is successful, the following SNAT exclusion is added alongside the default private IP ranges as shown below: Conclusion: In this part of the series, we explored how to take Azure Firewall deployments to the next level by configuring advanced features through the REST API. From setting up DNAT rules and enabling IDPS with fine-grained control, to applying web category-based filtering, FQDN filtering, URL filtering, associating multiple public IP addresses, enabling diagnostic logging, and customizing SNAT behaviors — you now have a comprehensive toolkit to secure complex environments at scale. By using the REST API, you can automate firewall management, enforce consistent security policies, and quickly adapt to changing network requirements — all critical capabilities for modern cloud-native architectures.532Views0likes0CommentsOptimize Azure Firewall logs with selective logging
A common question from customers is whether Azure Firewall supports filtering or selecting which logs are sent to a Log Analytics workspace. This concern usually stems from the high cost of storing large volumes of data — especially in environments where the firewall inspects substantial amounts of network traffic. Azure Firewall now supports ingestion-time transformation of logs in Azure Log Analytics. This capability introduces selective and advanced filtering, giving customers more control over what data is collected and analyzed. In this blog post, we’ll explore a major new capability: Azure Firewall now supports ingestion-time transformations in Log Analytics — enabling flexible, cost-efficient logging through selective data collection. Why does it matter? For many enterprise customers, the cost of ingesting Azure Firewall logs into Log Analytics — especially at scale — can be significant. Depending on the logging mode (Basic or Analytics), ingestion costs can be substantial, potentially making it challenging to expand logging coverage across additional workloads. With ingestion-time transformations, users can filter logs by rows, columns, timestamps, and more — and apply transformations before ingestion. This ensures that only relevant and critical data is stored, helping reduce costs while retaining the necessary telemetry for analysis, threat detection, and compliance. Customer benefits Security monitoring: Log only suspicious traffic for more targeted threat detection. Cost optimization: Avoid ingesting and storing unnecessary data. Compliance: Use DCR (data collection rules) to filter and route logs to meet audit/reporting needs. Incident response: Focus on logs that matter, accelerating investigation time. Custom alerts: Build insights on top of curated, high-value logs. What are transformations in Azure Monitor? Ingestion-time transformations in Azure Monitor allow you to filter or modify incoming telemetry before it reaches your Log Analytics workspace. This happens in the cloud pipeline — after the data source (such as Azure Firewall) sends its logs, but before those logs are ingested and stored. Transformations are defined using DCR and written in Kusto Query Language (KQL). Each transformation runs against incoming records individually, letting you precisely control what gets stored – and what doesn’t. For example, you might collect only entries where the action column contains the word “deny”. That filter can be applied at ingestion time, so only those critical logs are stored. The diagram below shows how this works end-to-end, from data source to filtered ingestion. To learn more and estimate potential processing charges, refer to the official documentation. Transforming Azure Firewall logging In this section, we’ll walk through a few real-world use cases shared by customers — including how to create a DCR based on specific filtering criteria. Important: Ingestion-time transformations for Azure Firewall logs are supported only when using resource-specific logs. If you’re using legacy diagnostic settings, this capability is not available. To enable transformations, ensure your firewall is configured to send logs using the Azure Firewall resource-specific log schema. First, navigate to your Log Analytics workspace and locate the table where your Azure Firewall logs are stored (e.g., AZFWApplicationRule). Click the three-dot menu (…) on the right and select “Create transformation”. Creating a transformation is a 3 steps-process. Step 1 – Basics: Create a DCR to define how incoming data is processed and specify where it should be stored. Step 2 – Schema and transformation: Use the Transformation Editor to write a KQL query that filters the incoming data based on your criteria. Step 3 – Review: Review the table name, DCR name, and KQL query before clicking “Create”. This summary ensures everything is configured correctly. For more information on how to create a DCR, refer to the official documentation. Use case 1: Excluding alerts from low priority IDPS signatures This DCR transformation filters and reshapes incoming Azure Firewall IDPS logs before they're ingested into a Log Analytics workspace. source | where Action !contains "alert" and Severity != 3 | project TimeGenerated, Protocol, SourceIp, SourcePort, DestinationIp, DestinationPort, Action, SignatureId, Description, Severity Here's a breakdown of what it does: source: This refers to the incoming data stream — in this case, the AZFWIdpsSignature table (intrusion detection/prevention logs from Azure Firewall). | where Action !contains "alert" and Severity != 3: This line filters out any log entries where the Action contains "alert" (non-blocking detection events). Any entries where Severity equals 3 (which represents low severity events). The result: We’re keeping only more actionable or higher-severity entries that don’t just raise alerts but may involve blocks or higher-severity behaviors (e.g., deny actions, critical or warning severities). | project ...: The project statement selects and forwards only the specified columns to the Log Analytics workspace. When you run a query in your Log Analytics workspace, you’ll notice that only the specific columns defined in your transformation’s project statement are available — and they appear in the exact order specified in the query. Use case 2: Filtering out unnecessary logs (trusted or testing networks) This DCR transformation filters out log entries from specific source IP address ranges before they're ingested into Azure Monitor. In this scenario, the 10.0.200.x and 10.0.300.x ranges might represent trusted or test network segments that generate high volumes of traffic — traffic that don’t need to be logged. By excluding these IPs at ingestion time, you can significantly reduce unnecessary log volume and associated costs. source | where not( SourceIp startswith "10.0.200." or SourceIp startswith "10.0.300." ) | project TimeGenerated, Protocol, SourceIp, SourcePort, DestinationIp, DestinationPort, Action, ActionReason, Policy, RuleCollection, Rule Here's a breakdown of what it does: source: This refers to the incoming data stream — in this case, the AZFWNetworkRule table. | where not (…): Applies a filter to exclude logs that match the criteria inside. SourceIp startswith "10.0.200." and SourceIp startswith "10.0.300.": These conditions match any log where the SourceIp address falls within the 10.0.200.0/24 or 10.0.300.0/24 subnets (i.e., IPs like 10.0.200.1, 10.0.200.45, etc.). | project ...: The project statement selects and forwards only the specified columns to the Log Analytics workspace. Conclusion By leveraging ingestion-time transformations through DCR, organizations gain full control over which Azure Firewall logs are ingested in Log Analytics. This selective logging capability helps reduce noise, cut costs, and retain only high-value data for security, compliance, and operational insights. As Azure Firewall evolves these enhancements offer greater flexibility and efficiency for managing cloud-native network telemetry. Resources Azure updates | Microsoft Azure Monitoring data reference for Azure Firewall | Microsoft Learn Transformations Azure Monitor - Azure Monitor | Microsoft Learn Create a transformation in Azure Monitor - Azure Monitor | Microsoft Learn1.5KViews1like0CommentsSecuring Containerized Applications with Application Gateway for Containers and Azure WAF
Azure Application Gateway for Containers is a modern, Kubernetes-native Layer 7 load balancer designed to manage ingress traffic for containerized applications running in Azure Kubernetes Service (AKS). Application Gateway for Containers is the evolution of the Application Gateway Ingress Controller (AGIC), and introduces a new control and data plane architecture, enabling near-instant updates to routes, probes, and backend pods. It supports features like traffic splitting, mutual TLS, header-based routing and increased performance—making it ideal for microservices and multi-tenant environments. But what truly sets Application Gateway for Containers apart is its native integration with Azure Web Application Firewall (WAF). Application Gateway for Containers introduces a Kubernetes-native custom resource called WebApplicationFirewallPolicy, allowing WAF policies to be defined and scoped directly within the cluster. WAF acts as the first line of defense, inspecting all incoming traffic before it reaches your pods. WAF policies can be applied at the listener level or scoped down to specific routes, giving you precise control over how and where security is enforced. This flexibility allows security teams to deploy global protections (like the OWASP Top 10 rules for SQL injection and cross-site scripting protection) across services while also enabling developers to fine-tune route-level rules for sensitive endpoints, like /login, /upload, or /admin. Further, Azure WAF supports prevention and detection modes, enabling you to start with alert-only configurations before moving to full enforcement allowing you to fine tune the WAF for your environment. You can also write your own rules by using the Custom Rules option. Using custom rules, you can block, allow, or log traffic based on headers, IP addresses, query parameters, or geolocation—giving security teams precise control over how threats are mitigated. Let’s walk through how Azure WAF enhances security when integrated with Application Gateway for Containers. Bot mitigation: Azure WAF’s bot manager uses Microsoft threat intelligence to categorize and manage bot traffic—blocking known malicious bots, allowing verified good bots, and logging unknown ones by default. DRS 2.1: Provides robust coverage against common web vulnerabilities, including Path Traversal, Cross-Site Scripting (XSS), SQL Injection and other OWASP Top 10 threats along with MSTIC (Microsoft Threat Intelligence Collection) rules. Custom rules: You can block requests with suspicious user-agent headers, rate-limit traffic to prevent abuse, geo-block traffic from regions you don’t serve, apply header inspection, IP filtering, and more Real-time observability: With Application Gateway for Containers, WAF logs and metrics are integrated into your observability stack. You can correlate WAF blocks with transaction IDs, trace attack vectors end-to-end, and validate that legitimate users remain unaffected. Let’s take a look at how you can achieve these benefits using WAF for Application Gateway for Containers: Deploying WAF and defining WAF policies in Kubernetes: Please make sure you have the following resources set up before getting started: Azure Kubernetes Service (AKS) – Ensure your backend application is deployed and running in AKS. Application Gateway for Containers – Deploy Application Gateway for Containers to manage ingress traffic to your containerized workloads. WAF Policy – Create a new WAF policy or reuse an existing one already configured for Application Gateway. Attach the WAF Policy – Attach the WAF policy with a new security policy under the Application Gateway for Containers settings as shown below. Note: Security policies act as the bridge between your Azure WAF policy and the Kubernetes-native routing resources (like Gateway or HTTP Route). Without this association, the WAF policy exists in Azure but isn’t enforced on your containerized traffic. In this example, we have setup a backend application in AKS. The setup includes: A namespace called test-infra Two services called backend-v1 and backend-v2 Two deployments called backend-v1 and backend-v2 You’ll also create: A Gateway named gateway-01 Two HTTP Routes: http-route1 for path /bar and /some/thing http-route2 for path /anything Defining WAF policies As mentioned earlier, Application Gateway for Containers introduces a new Kubernetes custom resource called WebApplicationFirewallPolicy which allows you to define and scope Azure WAF policies directly within your AKS cluster. The following scopes may be defined: Gateway (global) HTTP Route (granular) Note: These are not mutually exclusive, you can apply both a gateway-level policy and per-route policies, and the route-level policy takes precedence over the gateway-level one. Here is an example WebApplicationFirewallPolicy YAML file: apiVersion: alb.networking.azure.io/v1 kind: WebApplicationFirewallPolicy metadata: name: sample-waf-policy namespace: test-infra spec: targetRef: group: gateway.networking.k8s.io kind: HTTPRoute name: http-route2 namespace: test-infra sectionNames: ["pathA"] webApplicationFirewall: id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-0 Note: The name field here should match the HTTP route name so it can be applied to the appropriate HTTP route when there are multiple of them. Applying the policy: To apply the policy in AKS: kubectl apply -f waf.yaml To verify it was applied correctly: kubectl get webapplicationfirewallpolicy.alb.networking.azure.io -A -o yaml The output should look like this- apiVersion: alb.networking.azure.io/v1 kind: WebApplicationFirewallPolicy metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"alb.networking.azure.io/v1","kind":"WebApplicationFirewallPolicy","metadata":{"annotations":{},"name":"sample-waf-policy","namespace":"test-infra"},"spec":{"targetRef":{"group":"gateway.networking.k8s.io","kind":"HTTPRoute2","name":"http-route","namespace":"test-infra"},"webApplicationFirewall":{"id":"/subscriptions/{Subscription Name}/resourceGroups/{Resource Group Name}/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/{WAF Name}"}}} creationTimestamp: "2025-07-17T04:50:30Z" generation: 7 name: sample-waf-policy namespace: test-infra resourceVersion: "175009" uid: 031b6b5a-96c8-4d9f-8cc0-9d5e00000 spec: targetRef: group: gateway.networking.k8s.io kind: HTTPRoute name: http-route2 namespace: test-infra webApplicationFirewall: id: /subscriptions/{Subscription Name}/resourceGroups/{Resource Group Name}/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/{WAF Name} status: conditions: - lastTransitionTime: "2025-07-17T05:33:39Z" message: Valid WebApplicationFirewallPolicy observedGeneration: 7 reason: Accepted status: "True" type: Accepted kind: List metadata: resourceVersion: "" This confirms that the WAF policy has been applied correctly to the right HTTP Route as shown here - name: http-route2 In this scenario, we’ve configured two WAF policies: WAF Policy 1: Associated with http-route1, using DRS 2.1 in Prevention Mode. WAF Policy 2: Associated with http-route2, using a custom geo-blocking rule to deny US based traffic and is in Prevention Mode. Testing WAF behavior: In this scenario, we attempt to access the frontend URL specifically the path “/some/thing” which has the WAF Policy1 associated to it. To test the policy’s effectiveness, we simulate a SQL injection attack targeting this path as seen below. The response below demonstrates the WAF engine detecting and blocking the malicious request with an “Access Forbidden” response: In the next test scenario, when a request is sent from a US-based IP address to the path /anything, we get a 403 Forbidden message. This is because WAF Policy 2 is configured with a custom geo-blocking rule to block traffic from the US region using the Client IP address. It detects the origin and blocks the request. As a result, the client receives an “Access Forbidden” response, confirming that the policy is actively enforcing geographic restrictions. However, when accessing other paths such as /bar or /some/thing, the request is not blocked. This is because those paths are handled by a different route (http-route1) that is associated with WAF Policy 1, which does not include geo-blocking rules. This behavior highlights how WAF policy scoping allows you to apply different security rules to different parts of your application, enabling fine-grained control over traffic protection. Note: If a specific path does not have a WAF Rule associated with it, it inherits the WAF Policy that is applied at the Global level Monitoring: While Azure WAF protects the Application Gateway for Containers, having deep visibility into traffic and threat patterns is essential for maintaining a secure and resilient application environment. To do that, we will enable diagnostic logging on the Application Gateway for Containers as shown below: Once the traffic triggers a WAF rule due to an identified attack or custom rule, you will see WAF related logs using the query- “AGCFirewallLogs”. As seen, the logs provide detailed information related to the attacks such as the WAF policy that is being applied, the scope at which it is being applied, the RequestUri, RulesetType and much more. Azure WAF also supports sensitive data scrubbing. For example, you can redact fields like the request IP address in the logs to maintain privacy while still capturing actionable intelligence as shown below: As seen here, by integrating WAF logs and metrics into your observability stack, you gain real-time insights into blocked threats, user behavior, and application performance. This enables teams to trace incidents end-to-end, validate WAF effectiveness, and fine-tune policies with confidence. Whether you're investigating a blocked request or correlating alerts with backend performance, Log Analytics empowers you to move from detection to diagnosis seamlessly. Conclusion: Azure Application Gateway for Containers paired with Web Application Firewall (WAF) offers a powerful, flexible, and Kubernetes-native approach to securing microservices at the edge. By enabling WAF policies at both the listener and route levels, teams can enforce broad protections while tailoring defenses for high-risk endpoints. Whether you're mitigating bots, blocking injection attacks, or applying geo-based restrictions, Application Gateway for Containers with WAF empowers you to shift security left—closer to where your services live and evolve. Start with detection, move to prevention, and scale with confidence. Next steps What is Application Gateway for Containers? | Microsoft Learn Web Application Firewall on Application Gateway for Containers | Microsoft Learn Default rule set 2.1 - Azure Web Application Firewall WAF on Azure Application Gateway bot protection overview | Microsoft Learn Azure Web Application Firewall (WAF) v2 custom rules on Application Gateway | Microsoft Learn764Views1like0CommentsDraft and deploy - Azure Firewall policy changes [Preview]
In today’s cloud-centric digital landscape, maintaining secure and scalable network infrastructure is essential for enterprises navigating dynamic workloads and compliance demands. Azure Firewall, Microsoft’s fully managed, cloud-native service, offers robust security capabilities including stateful packet inspection, advanced threat prevention, autoscaling, and centralized policy enforcement across distributed Azure environments. To further simplify policy administration, the recently introduced draft and deploy feature enables security teams to safely edit firewall policies in a staging environment and apply those changes atomically. This structured workflow supports collaborative review cycles, minimizes configuration risks, and streamlines updates—especially for organizations with formal governance and change-management requirements. Challenges before draft and deploy: Before draft and deploy, firewall policy updates faced several operational hurdles: Every change, however small, can take several minutes to deploy Organizations with strict change-management frameworks struggled to integrate policy updates into existing approval workflows. Direct application of rule changes increases the chance of errors that could block critical traffic or expose workloads. How draft and deploy works: Draft and deploy introduces a two-phase model that decouples editing from deployment: Draft phase Clone the active policy into a temporary draft. Make and review multiple changes—add, modify, or remove rules—without affecting live traffic. Collaborate with peers, assign reviewers, and iterate until the draft meets requirements. Deploy phase Validate the draft to catch unsupported or invalid configurations. Deploy the draft in a single, atomic operation that replaces the active policy. This approach ensures policy consistency, minimizes deploy time, and reduces repetitive deployments. Supported scenarios and limitations: Azure Firewall draft and deploy is currently in preview and designed exclusively for Azure Firewall policies. Key points include: Aspect Details Availability Preview feature for Azure Firewall policy only Supported configurations Standard and Premium SKUs; policies with classic rules are not supported Draft persistence Drafts are snapshots of the applied policy at the time of draft creation; changes to the live policy afterward are not auto reflected Rule collection group (RCG) Creating new RCGs within a draft is not supported; add RCGs directly to the live policy first Concurrent drafts Only one draft per policy at a time Using draft and deploy via the Azure portal: Navigate to your Firewall policy resource. Under “Policy management,” select Draft + Deployment. Click Create draft to clone the current policy. Edit rules and collections as needed, saving frequently. The below image shows that a new network rule named “Microsoft” has been added. After review, select Deploy draft to apply all changes atomically. The rule changes will be highlighted as shown in below image. Once successfully deployed, this process can be repeated to make further updates to your policy as needed. As we can see in the below image the newly added rule has been successfully deployed and is now part of the policy. Azure CLI: The following CLI commands could be used to update the policy draft. More information on CLI commands can be found here: Draft + Deployment CLI Action Command Create a draft az network firewall policy draft create --name <policyName> --resource-group <rgName> List existing draft az network firewall policy draft list --name <policyName> --resource-group <rgName> Update draft az network firewall policy update --name <policyName> --resource-group <rgName> --rules <ruleFile> Deploy the draft az network firewall policy draft deploy --name <policyName> --resource-group <rgName> Delete a draft az network firewall policy draft delete --name <policyName> --resource-group <rgName> Troubleshooting scenarios: Here are some of the common troubleshooting scenarios and their respective causes and resolutions. Scenario Possible cause Resolution No changes in draft after edits Draft was created before policy updates Compare draft timestamp with change log; recreate or manually apply missing edits to the draft Commit validation errors Unsupported or invalid rule types Review draft for nested RCGs or invalid protocols; correct or remove unsupported configurations Draft creation fails Existing draft already present Deploy or delete the existing draft, then retry creation CLI error: “RGCA creation failed” Outdated or misconfigured CLI extension Update extension to v1.2.3 or higher; verify CLI configuration Deployment succeeds but no visible changes Draft missing latest edits Ensure all intended changes are included in the draft before deployment PowerShell/REST API draft creation fails Invalid API parameters Validate request schema against the Azure REST API documentation Conclusion: Draft and deploy transforms Azure Firewall policy management by separating editing from deployment and enabling atomic policy updates. Organizations can now collaborate on complex rule changes, enforce governance, and maintain continuous security without sacrificing agility. References: Azure Firewall Draft + Deployment (preview) | Microsoft Learn az network firewall policy draft | Microsoft Learn743Views2likes0CommentsEnhancements to the Azure Firewall User Experience
This blog was co-authored by Abhinav Sriram, with contributions from Gopikrishna Kannan. Introduction Everyday, IT administrators face the challenge of securing networks while maintaining application uptime and performance. With a constantly evolving threat landscape and an influx of new vulnerabilities, staying ahead is no easy task. Cloud applications are increasingly leveraging AI to access critical data with reliability, and new applications are rapidly being onboarded. At the same time, organizational security requirements continue to expand in response to government regulations and customer expectations. CIOs are demanding that IT teams do more with less, and the demands can feel daunting. To meet these challenges, IT administrators need modern tools and resources that simplify operations, maintain security, and ensure application performance and compliance. The Azure Firewall team understands these operational needs and the proactive measures administrators require to minimize risk. We're excited to introduce new experiences and capabilities that streamline firewall management, making it easier to monitor, diagnose, and resolve issues quickly. Improved governance and compliance: Through Azure Policies and Azure Advisor recommendations, IT teams can maintain alignment with product and organizational standards, minimizing risk through proactive guidance. Optimized management and diagnostics: Through Azure Firewall Policy Change Tracking and the Diagnose and Solve Blade, administrators can monitor configuration changes and identify solutions to resolve issues quickly. In addition, the new user experiences for setting up a Management NIC and upcoming features like Packet Capture and Maintenance Configuration provide users with the kind of enhanced control and visibility they need for critical services like Firewall. Stay Updated with New Capabilities: The "What's New" experience in Azure Firewall Manager and the Private Preview Program keep administrators informed about updates and provide early access to new features. In this blog, we'll walk through each of these features more in-depth and explore how they assist administrators with tasks at different stages of firewall management beginning with features that bring enhanced governance and compliance to Azure Firewall. Built-In Azure Policies Azure Firewall now includes support for Azure Policy, designed to enhance governance and enforce security best practices. When administrators are initially configuring their firewalls or shortly after deployment, managing configurations across multiple firewalls to meet organizational standards can be complex and prone to oversight or error. These built-in policies simplify this process by automatically applying rules across your firewall resources and ensuring compliance with essential security and operational requirements. For example, administrators can enforce policies requiring Threat Intelligence to be enabled on all firewalls for added protection or mandating that only encrypted traffic is allowed into the environment. These policies offer a streamlined way to maintain consistent security practices, aligning firewall settings with organizational and regulatory standards. For detailed information on configuration and enforcement of these policies, see this blog. Image: Built-in Azure Policies Image: Azure Policy compliance enforcement across Firewall resources Built-In Azure Advisor Recommendations After deploying a firewall, it's essential to monitor any limitations that could impact its performance, particularly in large or complex environments with high traffic volumes. Azure Advisor, a personalized service, offers recommendations to help users optimize Azure resources across five key areas: reliability, security, operational excellence, performance, and cost. With this integration, Azure Advisor can proactively notify you if your Azure Firewall deployment is reaching any limitations, experiencing performance impacts, or has potential misconfigurations. This means you’ll be able to receive timely recommendations to address issues before they affect your network security, ensuring a seamless and secure experience. The current Azure Advisor recommendations include the following: Exceeding rule limitations on Firewall policy: Get notified if your firewall policy is reaching the maximum allowed rules, which may impact performance. Exceeding IP Group limitations on Firewall policy: Alerts for when IP groups used in your firewall policies exceed their defined limits. Exceeding Firewall Policy or Rule Collection Group size: Suggestions to optimize or restructure policies when they grow too large, potentially affecting management or performance. By leveraging these recommendations, you can maintain optimal firewall performance, address potential security risks, and reduce unnecessary costs. Stay tuned for more enhancements as we continue to add more recommendations into Azure Advisor for Azure Firewall. Policy Analytics is another Firewall capability that provides you with insights and recommendations for your environment. Image: Azure Advisor recommendation for “Firewall policy is reaching network rule limitations” Next, let’s dive into the capabilities that help with optimized management and diagnostics. Change Tracking (Preview) Azure Resource Graph (ARG) is an Azure service designed to provide efficient and performant resource exploration at scale. Azure Resource Graph (ARG) provides change analysis data for various management and troubleshooting scenarios. Users can find when changes were detected on an Azure Resource Manager (ARM) property, view property change details and query changes at scale across their subscription, management group, or tenant. ARG change analysis recently added support for RuleCollectionGroups. You can now track changes to Azure Firewall Rule Collection Groups using an Azure Resource Graph query from the Azure Portal ResourceGraphExplorer page using a query like this: Below is a sample change output. This capability can help you track changes made to your Firewall rules helping ensure accountability for a sensitive resource like a Firewall. Diagnose and Solve Blade The Diagnose and Solve problems blade is a feature in Azure that helps customers troubleshoot and solve Azure issues. It helps you explore the most common problems for your Azure Firewalls by providing quick access to service/resource health insights, automated troubleshooters, curated do-it-yourself troubleshooting guides, and additional troubleshooting tools that are all part of the self-help experience designed to help customers solve their problems even before bringing it to Microsoft support teams. To use this feature, you need to navigate to your Firewall in the Azure portal and select Diagnose and solve problems. Image: The Diagnose and Solve blade in Azure Firewall Portal This feature allows you to troubleshoot failures without needing to go through the standard process of filing a support ticket and also provides you with a summarized view of resource health and changes made to the resource in the last 72 hours. Management NIC Changes An Azure Firewall Management NIC separates Firewall management traffic from customer traffic. The firewall routes its management traffic via the dedicated AzureFirewallManagementSubnet (minimum subnet size /26) and its associated public IP address. This feature was previously called Forced Tunneling, as originally, a Management NIC was required only for Forced Tunneling. However, upcoming Firewall features will also require a Management NIC. To support any of these capabilities, you must create an Azure Firewall with the Firewall Management NIC enabled or enable it on an existing Azure Firewall. This is a mandatory requirement to avoid service disruption. To learn more, see Azure Firewall Management NIC | Microsoft Learn. Image: The updated Firewall Management Portal UX in the Create Azure Firewall workflow Lastly, let’s take a look at some of the ways in which you can stay updated with the latest going on with Azure Firewall. Updates to What’s new in Firewall Manager The “What’s new” page in Firewall Manager is kept updated with the most recent product releases across the Network Security portfolio and now easily links to the Copilot for Security integration for Azure Firewall. The Azure Firewall Plugin has four capabilities that help analysts perform detailed investigations of the malicious traffic intercepted by the IDPS feature of their firewalls across their entire fleet using natural language questions in the Copilot for Security standalone experience. To learn more about the user journey and value that Copilot can deliver, see the Azure blog. To see these capabilities in action, take a look at this Tech Community blog, and to get started, see the documentation. Image: Snapshot of the What's New user experience in Azure Firewall Manager Azure Connection Program The Azure Connection Program is an engineering feedback community for Azure customers and partners allowing you to directly engage with the product team of Azure Firewall and get early access to upcoming features like Packet Capture and Maintenance Configurations. This is an avenue where the product team actively engages with customers to get valuable feedback that can help impact the product roadmap. If you’re interested in joining and trying out new features early, please sign up here.2.2KViews2likes3CommentsExploring the New Resource Specific Structured Logging in Azure Firewall
In this blog we will discuss in detail about the new Structured Firewall Logs feature which helps us with enhanced logging capabilities, addressing concerns of the IT Teams about having better visibility of all the traffic passing through their firewalls and identifying vulnerabilities to act quickly.19KViews3likes3CommentsAzure WAF Integration in Security Copilot is Now Generally Available
We’re excited to announce the general availability (GA) of Azure Web Application Firewall (WAF) integration with Microsoft Security Copilot. This marks a significant advancement in web application protection, bringing together Azure WAF’s industry-leading defense with the AI-powered capabilities of Security Copilot to transform how security teams detect, investigate, and respond to threats. Why This Integration Is a Game-Changer Modern web applications face relentless threats - from SQL injections and cross-site scripting (XSS) to bot attacks and sophisticated Layer 7 DDoS attempts. Defending against these threats requires more than just reactive measures; it demands intelligent, scalable solutions. With Azure WAF now integrated into Security Copilot, security teams can gain: Proactive threat analysis: Quickly uncover attack patterns and identify emerging threats. Optimized WAF configurations: Use AI insights to fine-tune rules and policies. Accelerated investigations: Leverage Copilot’s generative AI to streamline incident triage and response. This integration enables teams to work smarter and faster - turning raw data into actionable intelligence with the help of natural language prompts and AI-guided workflows. Seamless Protection Across Azure Platforms Azure WAF protects applications behind Azure Front Door and Azure Application Gateway, offering centralized, cloud-native security at scale. Now, with Security Copilot, analyzing WAF diagnostic logs no longer requires manual parsing or deep scripting expertise. Instead, AI delivers contextual insights directly to your SOC teams, cloud admins, and DevSecOps engineers. Whether you're investigating blocked requests or tuning security policies, this integration helps reduce operational overhead while strengthening your overall security posture. What Can You Do with Azure WAF in Security Copilot Let’s explore some of the core capabilities now available: SQL Injection (SQLi) Attack Analysis Understand why Azure WAF blocked specific SQLi attempts through detailed summaries of diagnostic logs and correlation of related events over time. Cross-Site Scripting (XSS) Attack Insights Get clear explanations for WAF’s enforcement actions against XSS attacks, with trend analysis across your environment. Top Offending IPs Analysis Identify the most malicious IPs triggering WAF rules, along with insights into the behaviors and rule patterns that led to their blocking. Most Triggered Rules and Actions Gain visibility into your most active WAF rules - helping prioritize tuning efforts and enhance threat detection effectiveness. These capabilities are designed to turn WAF data into actionable knowledge - without the need for custom queries or extensive log review. Built for the Future of Intelligent Security As threats continue to evolve, so must our defenses. The Azure WAF and Security Copilot integration represents the next generation of web application protection - combining automation, AI reasoning, and expert knowledge to deliver adaptive security at cloud scale. By augmenting your team with AI, you can stay ahead of attackers, protect critical apps, and respond faster than ever before. Learn More and Get Started The GA of Azure WAF integration in Microsoft Security Copilot is more than just a feature release - it’s a new paradigm for web application security. Explore the capabilities today by visiting the Azure WAF documentation. Want to talk to us? Reach out to the Azure WAF product team to share feedback or request a demo. Let’s build a more secure web, together.825Views1like0Comments