route from onpremise network to vm in peered vnets in Azure

APTOS 221 Reputation points
2022-12-08T16:37:55.77+00:00

Hello ,

i have a vpn site to site between an onpremise network and vpn gateway in azure .the vpn gateway is in Vnet A.
Vnet A is in full peering with vnet B

i can connect from onpremise to vm in subnetA ( VnetA)
I can connect from subnetA to a VM in onpremise

but how can i connect from onpremise to VM in Vnet B .May be should create some NSG rules but i don't know which rules i should create

thanks a lot for helping

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

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 47,046 Reputation points Microsoft Employee
    2022-12-09T06:00:15.207+00:00

    Hi @APTOS ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you would like to establish communications between OnPrem servers and VMs in the peered VNet.

    You do not have to manually add any route table to achieve this.

    Instead, you can simply configure VPN gateway transit for virtual network peering to make this work.

    In the VNet where the VPN Gateway resides,

    • Open the Peering between this VNet and the peered VNet
    • Enable "Use this virtual network's gateway"

    In the Peered VNet,

    • Open the Peering between this VNet and the VNet where VPN Gateway resides,
    • Enable "Use remote gateway"

    This should add the routes of the peered VNet to the S2S Tunnel and your OnPrem would start learning the routes.

    Thanks,
    Kapil

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    1 person found this answer 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.