Internet Routing via Azure Firewall

jitesh k 0 Reputation points
2023-09-01T07:11:19.8466667+00:00

Hell All.

We have a hub and spoke set up within Azure, within our hub resides our azure firewall and a express route gateway.

The hub has 2 spoke vnets peered, each subnet within the peered vnet, has a UDR with a entry 0.0.0.0/0 pointing to the private ip address of our azure firewall.

For some reason, we are not seeing any internet bound traffic hit our firewall.

Upon further investigation, we found the following:

  1. azure firewall configured with forced tunnelling
  2. from on-prem there is a bgp route which has been advertised for 0.0.0.0/8, which i assume directs internet bound traffic to an on-prem firewall.

So my question, which i need assistance with is, can we over-ride the advertised route of 0.0.0.0/8 somehow and force internet traffic to go via the azure firewall instead?

Was thinking to create a route table and associate it to the AzureFirewallSubnet, which has a route of 0.0.0.0/1, which has a next hop as Internet.

I am not sure, if this would do anything, but any suggestions would be helpful.

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,567 questions
Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
687 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,534 questions
Azure Firewall Manager
Azure Firewall Manager
An Azure service that provides central network security policy and route management for globally distributed, software-defined perimeters.
95 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 47,206 Reputation points Microsoft Employee
    2023-09-01T07:48:44.4133333+00:00

    @jitesh k

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to route all internet bound traffic via Azure Firewall.

    Observation:

    • I see OnPrem is advertising a route 0.0.0.0/8 to Azure.
    • Azure Firewall is configured in Forced Tunneling mode

    Analysis:

    1.We must first understand how Azure routes traffic :

    • When outbound traffic is sent from a subnet, Azure selects a route based on the destination IP address, using the longest prefix match algorithm (This is the deciding factor)
    • If multiple routes contain the same address prefix, Azure selects the route type, based on the following priority:
      • User-defined route
        • BGP route
          • System route
    • Now, you have your OnPrem advertising 0.0.0.0/8 to Azure.
    • So, adding a 0.0.0.0/1 Route to Route Tables will not be sufficient. (as 0.0.0.0/8 has a longest prefix match)
    • Instead, you must have both, 0.0.0.0/8 (to override onPrem BGP Route) and 0.0.0.0/0 (for any unmatched routes)
      • User's image

    2.Send Traffic from Azure Firewall to Internet

    • Even if the Azure Firewall is created with support for Forced Tunneling, you do not have to add a Route Table here at all.
    • The default behavior will provide outbound connectivity to Internet just like a regular firewall.

    Hope this helps.

    Cheers,

    Kapil


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.