Why Can’t I Connect to Azure SQL Server Over VPN with Private Link?

0
1
Asked By TechieNinja42 On

I'm trying to set up a connection to an Azure SQL Server using Private Link through a Point-to-Site (P2S) VPN Gateway. My setup includes a SQL Server that has both public and private access, and I have a Basic VPN Gateway configured with a successful P2S connection. I've also added a DNS entry to point the SQL Server's private IP to the Private Link. However, I'm facing some issues. Despite being connected to the VPN, the traffic is still going over the internet instead of through the VPN. The DNS mapping isn't working, which means I can't reach the SQL Server privately. Interestingly, when I whitelist my home WAN IP, the connection works fine. Here are my specific questions: 1. Does the Basic SKU VPN Gateway support access to Azure SQL over Private Link? 2. If not, what's the right way to set this up with a P2S connection? 3. Can the deprecation of the Basic SKU impact this issue? I'm trying to figure out whether it's a limitation of the Basic SKU or if I've missed something in the configuration.

3 Answers

Answered By DevChick_101 On

When connected to the VPN, try `Test-NetConnection $svr -port 1433` to your SQL Server. This will help determine if the connection is going through your VPN or not. I found that in similar situations, sometimes VPN connections can get tricky, and it helps to pinpoint where things fail.

Answered By CloudGuru88 On

To start troubleshooting, you might want to test port 1433 directly using the IP of your private endpoints with a command like `Test-NetConnection 10.0.0.4 -port 1433`. If that fails, it could signal a routing issue rather than a DNS problem. Also, make sure that the Private endpoint is either in the same VNet as your VPN gateway or that it's in a peered VNet where route propagation is enabled. Check any Network Security Group (NSG) or route table configurations on the private endpoint subnet too. As a last resort, deploying a test VM to verify the endpoint works without the VPN could be useful, even if it incurs costs, as it would give you a clearer picture of what's happening.

Answered By AzureExplorer34 On

I've had the same experience! When I connect through the VPN, I can't reach the SQL Server either. I suspect the issue is that your SQL Server isn't on your Virtual Network, which means the VPN rules might not apply the same way they do for VMs.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.