Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect to Azure SQL over VPN

I have a VPN connection to my Azure cloud. When I connect I am able to see most of my network devices such as virtual machines. However, I am not able to see Azure SQL databases. I contacted support and they explained that this is not supported and that I can only access Azure SQL outside of the cloud if I open the ports to certain ips. To me that seems like a major security issue and an inconvenience as support staff may be connecting from different locations and different ips from time to time. I am wondering how else others have ive come this issue.

like image 730
CodeMilian Avatar asked Oct 16 '22 12:10

CodeMilian


1 Answers

Azure SQL database is public over the Internet, however, the traffic through a VPN connection from your on-premise network is private so it does not support to access Azure SQL database over VPN. Also, VNet Service Endpoints don’t extend to on-premises. To allow access from on-premises, Firewall rules can be used to limit connectivity only to your public (NAT) IPs.

In this case, you can use Firewall rules and VNet Service Endpoints together. You could get more details from this blog: General availability of VNet Service Endpoints for Azure SQL Data Warehouse enter image description here

Another option is to use Azure SQL Database Managed Instance, which must be deployed within an Azure virtual network and the subnet dedicated for Managed Instances only. Then you could use VNet Peering or S2S VPN to connect to your on-premise network.

  • Create a virtual network for Azure SQL Database Managed Instance
  • Connect your application to Azure SQL Database Managed Instance

Hope this could help you.

like image 90
Nancy Xiong Avatar answered Oct 30 '22 12:10

Nancy Xiong