简体   繁体   中英

Connect VM or web app in one region to SQL server in another region across globally peered vnet in azure

I have an azure web app in UK South and an azure SQL server in UK West. At the moment they can communicate because I have the option enabled on the server to allow access to azure services.

I want to secure the SQL server behind a vnet, so I have created a vnet in each region and setup peering between them.

I have added vnet rule to the SQL server and enabled the service endpoint for sql on the subnet so that the SQL server is now secured behind the vnet in the same region, and disabled the option to allow access to azure services.

I have then added the vnet in UK South to the web app (using the preview option in the portal), which I assumed would allow the web app to access the SQL server via the peered vnet. However the connection keeps getting refused.

Am I correct in my assumption that this should just work? Or am i missing something?

I have also tried setting up a VM on each vnet and while I can ping each VM from the other and can get the vm in the same region as the SQL server to connect. I cant get the VM in the other region to connect to the SQL server.

Can anyone help with how I get this setup correctly?

According to my research, if we use regional VNet Integration (using the preview option in the portal), we cannot reach resources across global peering connections (Connecting virtual networks across Azure regions). For more details, please refer to the docuemnt在此处输入图片说明

According to the situation, I suggest you add your web app and sql in the same region VNet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM