Azure VPN Gateway and Azure Firewall - S2S communication filtering

Christophe_M 40 Reputation points
2024-02-04T19:53:09.9833333+00:00

Hi Everyone! Please, I need your advice. I have Virtual network gateway which connects three on-prem sites (3 x Local network gateways). This part works perfect. There are only route and policy based routing (no dyn). All endpoints can ping each other from all sites. I want to filter traffic between S2S sites. I created an Azure Firewall in the same vNet as VNG. Made UDR with subnet of:

  1. site 1 subnet -> Virtual Appliance -> FW internal iface
  2. site 2 subnet -> Virtual Appliance -> FW internal iface
  3. site 3 subnet -> Virtual Appliance -> FW internal iface

And attached it to GatewaySubnet. I expected that without rules all traffic would drop but it was flowing as usual. My FW does not work if I even create network policy. What am I doing wrong? Thank you.

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,436 questions
Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
600 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 39,461 Reputation points Microsoft Employee
    2024-02-07T04:57:29.67+00:00

    @Christophe_M

    Thanks for your detailed explanation of the environment.

    To answer your query, it is not possible to filter Azure VPN Gateway Transit traffic via Azure Firewall.

    As mentioned by Priya Kumar, you would require a vWAN to achieve this.

    With vWAN,

    To explain why this would not work with a regular VPN Gateway, AzFW and UDR.

    • Consider sites A (10.A.x.x/16) and B (10.B.x.x/16) connected to a VPN Gateway
    • You attach a UDR with the below routes on GatewaySubnet
      • 10.A.x.x/16 ------------> AzFW
      • 10.B.x.x/16 ------------> AzFW
    • No Route is required on AzureFirewallSubnet as this learns the route from system and nexHop here is VPNGw
    • Now, if a packet from SiteA destined to SiteB is sent via the TunnelA,
    1. It hits the GatewaySubnet and because of the UDR, it goes to AzFW
    2. AzFW's nextHop would be VPNGw
    3. Now, from point 1, we know the nextHop for the GatewaySubnet is AzFW (Loop).
    4. The traffic keeps on going back and forth between GatewaySubnet and AzFW creating a loop until it gets dropped.
    5. Hence, this design would not work.

    Hope this provides more clarity. Kindly let us know if this helps or you need further assistance on this issue.

    Thanks, Kapil

    0 comments No comments

0 additional answers

Sort by: Most helpful