我有一个网站(应用服务),1 个 Sql Server,上面有 2 个数据库。 每个月我都会随机收到一个错误:
Cannot open server 'myServer' requested by the login. Client with IP address 'xx.xxx.87.3' is not allowed to access the server.
To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.
It may take up to five minutes for this change to take effect.
我的问题是,我怎么知道这个 IP 地址是什么应用程序/服务? 这不是我网站的 IP 地址,如果我 ping 数据库的 CNAME,它与此 IP 不匹配。但是如果我不添加它,我的整个网站就无法运行。 当某些事情发生变化时,我必须每月手动添加一次。我如何找出这个 IP 地址连接到什么?
答案 0 :(得分:1)
基本上,有两种方法可以解决您的问题:
在 SQL Server firewall-config 上将 Allow Azure services and resources to access this server
指定为 Yes
,以便您的 SQL Server 允许所有 Azure 资源访问。
将所有 outbound IPs of your Azure app service 添加到您的 SQL Server 防火墙白名单中。它比第一种方式具有更高的安全级别。您可以在此处找到 Azure 门户上的所有出站 IP:
答案 1 :(得分:0)