Get in touch with us!

Azure P2S VPN – How to route between vNets

In this scenario we have three networks one on premise and two in Azure, one ASM (vNet1) and one ARM (vNet2).

External users access the network using Azure P2S VPN but are unable to reach vNet2 and the office network.

In the local office VPN device, we have the following routes to the S2S tunnel.
192.168.0.0/24 (vNet1)
172.16.0.0/16 (vNet2)
192.168.137.0/24 (VPN)

In vNet1 we have two S2S tunnels configured. One “local network sites” named Office and one named vNet2, the routes looks like this.

Office 10.0.0.0/24
To vNet2 172.16.0.0/16

And finally in vNet2 we have one “Local network Gateway” configured with the following networks.
10.0.0.0/24 (Office)
192.168.0.0/24 (vNet1)
192.168.137.0/24 (VPN Clients)

When connected through the P2S tunnel. We only get the routes for the target vNet, In this case vNet1. L

So how do we fix it?

Download the client and note the name of the file. ([GUID].exe)

Goto

%appdata%MicrosoftNetworkConnectionscm

And open the folder named as your VPN client installer file (GUID).

Open the file named “Routes.txt”

Add or modify the routes in the files and save it.

ADD 192.168.0.0 MASK 255.255.255.0 default METRIC default IF default
ADD 172.16.0.0 MASK 255.255.0.0 default METRIC default IF default
ADD 10.0.0.0 MASK 255.255.0.0 default METRIC default IF default

Note, if you add a route that already existing route the connection will fail.

After you reconnect you’ll have you new routes configured.

Final step is to open and modify the file named “azurevpnbanner.bmp”

And next time you’ll connect like a ninja.

Submit a Comment

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