Hi @Subash Basnayake it seems like Vnet B is not linked to the private dns zone created for azure SQL private endpoint. Seems it is resolving to a public ip. Can you try linking the Vnet to the private dns zone for resolution? https://learn.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links
Cannot connect to Azure SQL DB using private endpoint from a peered network
I have 2 v-nets in 2 subscriptions v-netA and v-netB.
v-netA and v-netB has a v-net peering configured.
v-netA has a VM-A and v-netB has VM-B. These VMs can communicate with each other which means that the v-net peering works fine.
v-netA has Azure SQL DB (paas) in which the public access is disabled and a private endpoint is configured.
I can connect to the SQL DB using SSMS installed in VM-A and when I use nslookup for the <sqlsrv>.database.windows.net it gives me the private IP of the endpoint.
When I try to connect to the SQL DB using SSMS installed in VM-B it gives an error and the nslookup gives a random IP that I can't recognize.
Where am I doing wrong?
-
Vidya Narasimhan 2,201 Reputation points Microsoft Employee
2022-03-24T13:19:39.3+00:00