Sending Internet Traffic from P2S Clients Through an NVA

Azure can be used to offer Point-To-Site (P2S) connectivity for individual users, that by leveraging a VPN client on their systems (Windows, Linux or Mac) can get connectivity to Azure resources. This P2S connectivity is often limited to Azure resources, but by leveraging the Azure Route Server, additional access is offered.

For example, if an ExpressRoute connection exists in Azure, just by deploying the Route Server in the same Virtual Network as the VPN and ExpressRoute Virtual Network Gateways, the P2S clients will gain network connectivity to on-premises resources as well.

The goal of this post is verifying whether Internet connectivity can be achieved using the Azure Route Server too. Sneak preview: yes it can! This is the topology tested:

Internet traffic flow from P2S client through NVA

As you can see, the NVA can advertise prefixes to the Route Server, the Route Server will propagate them towards the VPN Gateway, and the latter will program them in the VPN Client. My first test was advertising the from the NVA to the Route Server. All was propagated down to the VPN Client, as this screenshot shows:

By the way, you can ignore the, this is a prefix propagated by the NVA that is not relevant for this scenario.

However, Internet connectivity from the PC was still going directly, not through the VPN tunnel. The fact that Azure splits the VNet prefix ( in two ( and made me try the same thing with the default, and advertise it in two halves ( and This is the result in the VPN client:

Azure VPN Client for Windows

Before verifying connectivity, let’s check the environment. Firstly, the Route Server is peered correctly with the NVA:

$ az network routeserver peering list --routeserver rs -g nva -o table
Name PeerAsn PeerIp ProvisioningState ResourceGroup
------ --------- -------- ------------------- ---------------
nva 65001 Succeeded nva

The Route Server is receiving the routes advertised from the NVA, and you can see that the ASN is 65001, the one configured on the NVA as described in the diagram above:

$ az network routeserver peering list-learned-routes -n nva --routeserver rs -g $rg --query 'RouteServiceRole_IN_0' -o table
LocalAddress    Network      NextHop    SourcePeer    Origin    AsPath    Weight
--------------  -----------  ---------  ------------  --------  --------  --------      EBgp      65001     32768      EBgp      65001     32768      EBgp      65001     32768      EBgp      65001     32768

In the BGP adjacencies of the VPN Gateway you can see the Route Server (the following output has been split in two, each VPN Gateway instance has three BGP adjacencies). The ASN of the Route Server is 65515, a non-customizable value at this point in time:

$ az network vnet-gateway list-bgp-peer-status -n vpngw -g $rg -o table
Neighbor ASN State ConnectedDuration RoutesReceived MessagesSent MessagesReceived
---------- ----- --------- ------------------- ---------------- -------------- ------------------ 65515 Connected 00:46:04.5693819 2 63 66 65515 Connected 00:46:04.5537540 2 63 67 65501 Connected 01:02:04.4743764 2 84 88 65501 Unknown 0 0 0 65515 Connected 00:46:05.0984084 2 63 66 65515 Connected 00:46:05.0984084 2 62 64 65501 Unknown 0 0 0 65501 Connected 01:01:39.1186661 2 92 86

And the BGP routes of the VPN Gateway contain the routes coming from the NVA, with the right AS path (65515 for the route server, 65001 for the NVA):

❯ az network vnet-gateway list-learned-routes -n vpngw -g $rg -o table
Network Origin SourcePeer AsPath Weight NextHop
---------------- -------- ------------ ----------- -------- --------- Network 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 IBgp 32768 Network 32768 EBgp 65515-65501 32768 EBgp 65515-65501 32768 Network 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 EBgp 65515-65001 32768 EBgp 65515-65001 32768 IBgp 65515-65001 32768 Network 32768 IBgp 32768 EBgp 65515-65501 32768 EBgp 65515-65501 32768

And sure enough, the client should have connectivity to the public Internet. To verify whether we are going through the NVA, I use, a web site that will return the public IP of the client:

> curl -s4

If the Internet flow is going through the NVA, that public IP should be the one assigned to the NVA, which is easy to check:

$ az network public-ip show -n nva-pip -o table -g $rg
Name     ResourceGroup    Location    Zones    Address       AddressVersion    AllocationMethod    IdleTimeoutInMinutes    ProvisioningState
-------  ---------------  ----------  -------  ------------  ----------------  ------------------  ----------------------  -------------------
nva-pip  nva              westeurope   IPv4              Dynamic             4                       Succeeded

So all works as expected! The only caveat is that instead of advertising a, we had to send the default route in two halves ( and Note that only IPv4 routes are supported by the VPN Gateway today, so if the client has a dual stack, IPv6 traffic would flow outside of the tunnel. Something else I observed is that traffic originated in the Windows Subsystem for Linux (WSL2 in my case) doesn’t seem to work through the tunnel, maybe something to investigate in a future post.

Thanks for reading!

6 thoughts on “Sending Internet Traffic from P2S Clients Through an NVA

  1. Aris

    Would you advise this pattern? Seems like a lot of work to configure a P2S VPN connection as a proxy gateway instead of split tunneling.

    There is not a lot of information out there about the different options for P2S VPN connections towards Azure with the forward proxy functionality, although it should be in high demand for cloud only companies who’d like their traffic to go through a VPN 🙂

    Liked by 1 person

    1. Hey Aris, in some of my customer interactions forced tunneling is a must. It is really not a lot of work, since the NVA would probably already exist in the VNet. If you prefer split tunneling, that is certainly easier though 🙂

      Liked by 1 person

  2. dw5304

    any chance you could provide a complete setup or how to for the entire deployment? seem to be getting stuck at the first step verifying the route server is good lol….

    Liked by 1 person

    1. Hey there! Not exactly this scenario with P2S, but the rest can probably be deployed using snippets from

      Liked by 1 person

  3. daviswe

    This is an excellent post. I’ve setup my NVA in azure but there’s no ASN for it in any of the configuration pages. Is this something that can be added? Also what type of NVA did you use? Lastly where did you add prefixes in NVA for etc to be advertised to Route Server? Thank you!!!


    1. Hey daviswe, happy you liked the post! I am normally using an Ubuntu VM with BIRD as NVA, but any other one supporting BGP should do. The ASN can be anything out of the reserved ones by Microsoft (65515-65520 and a few more). Your advertisements need to be defined in the NVA.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: