Azure P2S VPN routing caveats (with multiple VNet gateways)

I’ve recently worked with a customer that had an Azure Virtual Network Gateway in place to connect their remote workers (using native P2S functionality, supported under subnet to both Azure and on-premises networks. Pretty usual setup, to be fair. Let’s say:

  • Virtual Network Gateway
    • Name: vpngwA
    • Virtual Network: vnetA (
  • Local Network Gateway
    • Name: lngwA
    • Remote Network: (using S2S connection named “s2sA”)

This worked well for them, until they have exhausted the 128 connections limit for their protocol type (SSTP, by the way), due to the COVID-19 pandemic forcing the need for remote work to be almost exclusive.

With this background in mind, I’ve started working on workarounds that could avoid downtime (since changing protocol used in P2S VPN forces you to redeploy all profiles to your users, again), so I tried to just create a new Virtual Network (named, let’s say: vnetB with CIDR and peer both Azure VNets.

The thing is that, peering doesn’t extend routing configuration to Point to Site clients, as I was expecting it to do. Even if you force it (by using routes.txt or modifying the OpenVPN client configuration file), it will not work. The same applies to VNet-to-VNet connection.

So, the solution turned out to be, instead of peering Azure VNets, create a S2S VPN between them, like you usually do with your on-premises infrastructure (see scenario). This way, you can have your new VNet’s P2S clients (under network, for example) reach both your other Azure VNet named vnetA and its on-premises networks, through your existing S2S connection.

Hope you read this post and don’t waste time as I did!

2 thoughts on “Azure P2S VPN routing caveats (with multiple VNet gateways)”

  1. Did you check whether the peered VNets have UseRemoteGateway / AllowGatewayTransit features enabled? That could be the reason the trafic could not transit to peered VNets.

Leave a Reply to Gabriel Costa Cancel reply

Your email address will not be published. Required fields are marked *