Routing Issues with S2S VPN VNET Peered with ExpressRoute VNET

RahulRana-1085 30 Reputation points
2024-07-02T14:29:17.2566667+00:00

The Context:

I have 3 VNETS (VNET1, VNET2, VNET3). VNET1 has a S2S VPN allowing on-prem devices to connect to Azure. VNET2 has an ExpressRoute allowing another subnet of on-prem devices to connect to Azure. VNET3 also has an ExpressRoute allowing another subnet of on-prem devices to connect to Azure.

VNET1 and VNET2 are currently peered so that infrastructure in VNET2 can talk to the on-prem devices connected via VNET1. Currently there exists an Azure Firewall (oldFirewall) with a * rule on VNET1 to allow on-prem devices in VNET1 access to public internet. VNET3 is not yet peered with VNET2 but that is expected soon.

The Desired Outcome:

I want to delete the oldFirewall and create a newFirewall in VNET2 so that all traffic from on-prem passes through the newFirewall first and then the infrastructure VMs, following a hub-and-spoke model.

The Problem:

I am having trouble with the Routing Tables. How should the routing be configured so that all on-prem traffic routes to the newFirewall first?

@GitaraniSharma-MSFT , I tried following some steps here: https://learn.microsoft.com/en-us/answers/questions/860533/express-route-and-azure-firewall but I wasn't able to ping VNET1 on-prem devices from VNET2 VM after the routing change.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,035 questions
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,561 questions
Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
681 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,522 questions
Azure ExpressRoute
Azure ExpressRoute
An Azure service that provides private connections between Azure datacenters and infrastructure, either on premises or in a colocation environment.
383 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 47,196 Reputation points Microsoft Employee
    2024-07-11T06:09:52.5433333+00:00

    Hello @RahulRana-1085 ,

    From your verbatim, I see

    • VNET1 is connected to OnPrem1 via S2S
      • This VNET1 has a firewall, say OldFirewall
    • VNET2 is connected to OnPrem2 via ExR
    • You do not use Gateway Transit and instead, Connectivity between OnPrem1 to VNET2 is provided by routing traffic to the OldFirewall
    • Essentially, as you said,
      • VNET2 Azure VM <--> VNET1 Azure Firewall <--> S2S connected OnPrem1

    Yes, this configuration would work but note that this is not a typical Hub Spoke.

    • We suggest all the Gateways be in a single VNET and this VNET should be the Hub
    • Your situation is something like a multi Hub design.

    Observation:

    • From the logs you shared, I don't see two things happening
      • OnPrem1 <---> OnPrem2 flow
      • VNET1 <---> OnPrem2 flow
      • I think this is expected and doubt you will be able to achieve this with static routing.
    • This makes sense as from OldFirewall in VNET1, there is no way of routing to OnPrem2 (which is connected to VNET2)
    • i.e., The Firewall can only learn the OnPrem routes to which it's VNET is connected.
      • That's why you were able to access "S2S connected on-prem device"

    Now, per your requirement, "I want to delete the oldFirewall and create a newFirewall in VNET2 so that all traffic from on-prem passes through the newFirewall first and then the infrastructure VMs, following a hub-and-spoke model"

    • You will able to achieve connectivity between different VNETs that are peered to the VNET2 via the NewFirewall.
    • Also, OnPrem2 (connected to VNET2), can access all the peered VNETs via Azure Firewall
    • However, I don't think OnPrem to OnPrem connectivity can be achieved in this manner

    You can instead consider using Azure Virtual WAN for such complex scenarios which provided "Branch connectivity" across all connected sites.

    Hope this clarifies.

    Cheers,

    Kapil

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.