This guide explains the concept of forced tunneling in Azure Firewall deployments and demonstrates how to inspect outbound traffic using on-premises infrastructure before it reaches the internet. Forced tunneling is a key security feature that routes all outbound traffic through a designated next hop, similar to directing vehicles through a checkpoint for inspection. Consider an Azure Virtual Network with three subnets: back-end, mid-tier, and front-end. With a site-to-site connection linking this virtual network to an on-premises network, you can choose to inspect traffic originating from the back-end and mid-tier subnets using on-premises inspection systems. Forced tunneling achieves this by configuring the Azure Firewall to route internet-bound traffic to a predetermined next hop instead of sending it directly online. There are two primary methods to implement forced tunneling:Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
- Advertising a Default Route via BGP: By advertising a default route, you can direct outbound traffic to an on-premises edge firewall or another network virtual appliance.
- Employing a User-Defined Route (UDR): Define a route that redirects traffic to an on-premises inspection device.
If your Azure Firewall was previously deployed without forced tunneling enabled, it will need to be redeployed in forced tunnel mode to support this enhanced traffic redirection configuration.
Configuring Forced Tunneling in the Azure Portal
Follow these steps to enable forced tunneling within the Azure Portal:- Navigate to the Firewalls section and click on Create.
- During the setup process, carefully select the forced tunneling option.
- When you enable forced tunneling, a dedicated public IP address is automatically assigned as the management public IP for the Azure Firewall’s operations. This IP is exclusively used for management purposes and is not shared with any other service.
- A dedicated subnet, named “Azure Firewall Management Subnet,” is created to enforce policies that route traffic over the site-to-site connection to your on-premises firewall.


VPN Forced Tunneling
Another concept related to outbound traffic inspection is VPN forced tunneling. In this scenario, all traffic is funneled through the site-to-site connection to an on-premises VPN device or firewall—without the involvement of an Azure Firewall. Machines within the Azure Virtual Network are thus prevented from direct internet access; all internet-bound traffic is forced to pass through the on-premises inspection system. Below is an architecture diagram illustrating VPN forced tunneling:
- The Azure Virtual Network features a VPN gateway along with dedicated back-end, mid-tier, and front-end subnets.
- A site-to-site connection securely links the Azure Virtual Network to the on-premises infrastructure.
- The front-end subnet retains the capability for direct internet communication if required.
- All other traffic is routed over the VPN tunnel to be inspected by on-premises systems, eliminating the need for an Azure Firewall in this scenario.