Virtual Network already has a gateway/ Multiple VNET one VPN

Aaroon Virk 25 Reputation points
2023-08-18T15:40:29.56+00:00

Hi ,

I am in process of creating a VNGW , but I am getting the below error. I have 2 subnets under this Virtual network like below.

User's image

User's image

the back story of what I'm trying to achieve is have one VPN client that the end user can use to connect to machines on multiple vnets. So the idea is to create 2 VNGW and create connections between the 2 so that this should allow this. Rather than having 2 VPNs that the client needs to run. I have tried having just the one VPN gateway with VNET peering between the two VNETs as I thought this would originally work , but it hasnt hence the reason why im going down this route.

Any Help would be appreciated , or if there is a better approach to this

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,574 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,541 Reputation points Microsoft Employee
    2023-08-18T17:51:31.3066667+00:00

    @Aaroon Virk

    Thank you for reaching out to us with your query. I understand that you are trying to create a Virtual Network Gateway (VNGW) in Azure, but you are encountering an error message. You have two subnets under the same virtual network and want to create two VNGWs and connect them to allow a single VPN client to connect to machines on multiple VNets. You have tried using VNet peering, but it did not work. I will be happy to assist you with this.

    Based on the error observed in the screenshot above. In an Azure Virtual Network, you can deploy only one VPN gateway, this is documented here. You are getting the error above when you are trying to add another VPN Gateway to the virtual network which already has a VPN Gateway.

    Based on your statement above

    I have tried having just the one VPN gateway with VNET peering between the two VNETs as I thought this would originally work , but it hasnt hence the reason why im going down this route.

    This is actually a recommended way to achieve the required communication. A similar scenario is described here.

    User's image

    You need to set the following configuration on your peered Vnets.

    • Configure the peering connection to Allow gateway transit.
    • Configure the peering connection to Use the remote virtual network's gateway.

    You can also refer to this tutorial if you have hub and spoke architecture for your vnets.

    Please let us know if you are facing any issue for this set-up, we will gladly continue with our discussion.


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    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.