简体   繁体   English

通过VPN连接后无法连接到Azure SQL

[英]Not be able to connect to Azure SQL after connect through VPN

I am having a really wired problem with my home laptop. 我的家用笔记本电脑确实存在有线连接问题。

Below is what I have done: 以下是我所做的:

I have set up my own VPN via AWS. 我已经通过AWS建立了自己的VPN。 I added VPN ip address to Azure SQL firewall ip table 我将VPN IP地址添加到Azure SQL防火墙IP表

By not having VPN, I can connect to Azure easily. 通过没有VPN,我可以轻松连接到Azure。 However, once I connect to the VPN, I got error when I try to connect to Azure. 但是,一旦我连接到VPN,当我尝试连接到Azure时出现错误。

Error message: 错误信息:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. 已成功与服务器建立连接,但是在登录前握手期间发生错误。 (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (提供者:TCP提供程序,错误:0-指定的网络名称不再可用。)

On the other hand, I can use VPN and connect to Azure SUCCESSFULLY from my office desktop. 另一方面,我可以使用VPN并从办公室桌面连接到Azure SUCCESSFULLY。

I believe this is something to do with my Home laptop settings. 我相信这与我的家用笔记本电脑设置有关。 but even I disabled firewall on windows 7, and after disable firewall on azure SQL as well. 但是即使在Windows 7上我也禁用了防火墙,在Azure SQL上也禁用了防火墙。

I still having same connection problem 我仍然有相同的连接问题

any ideas? 有任何想法吗?

Try opening up the SQL Azure firewall to all addresses to do a test. 尝试对所有地址开放SQL Azure防火墙以进行测试。 Maybe when you VPN in, you are leaving through a proxy and so your actualy IP address to Azure is different. 也许当您进入VPN时,您是通过代理离开的,因此您到Azure的实际IP地址是不同的。 You can set up something like: 您可以设置以下内容:

IP range start: 0.0.0.0 IP范围开始:0.0.0.0

IP range end: 255.255.255.255 IP范围结束:255.255.255.255

If that works, then maybe you can do something with masking your VPN address like: 如果可行,那么您可以采取以下措施来屏蔽您的VPN地址:

10.10.0.0 - 10.10.255.255 10.10.0.0-10.10.255.255

By not having VPN, I can connect to Azure easily. 通过没有VPN,我可以轻松连接到Azure。 However, once I connect to the VPN, I got error when I try to connect to Azure. 但是,一旦我连接到VPN,当我尝试连接到Azure时出现错误。

Some VPNs support co-existence with normal internet connections while others don't. 有些VPN支持与普通Internet连接共存,而另一些则不支持。 I am not sure if AWS VPN supports that or not. 我不确定AWS VPN是否支持。 If not, when you connect to the VPN, you lose your internet connection and thus cannot connect to SQL Azure. 否则,当您连接到VPN时,您将失去Internet连接,因此无法连接到SQL Azure。

On the other hand, I can use VPN and connect to Azure SUCCESSFULLY from my office desktop. 另一方面,我可以使用VPN并从办公室桌面连接到Azure SUCCESSFULLY。

If the issue is related to firewall setting, you can try to change the setting programmatically, please refer to http://blogs.msdn.com/b/sqlazure/archive/2010/07/29/10043869.aspx for a sample. 如果问题与防火墙设置有关,则可以尝试以编程方式更改设置,请参考http://blogs.msdn.com/b/sqlazure/archive/2010/07/29/10043869.aspx

Best Regards, 最好的祝福,

Ming Xu. 徐明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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