Azure SQL 服务器防火墙

Azure SQL Server Firewall

有没有办法拒绝 public 网络访问并允许 Azure 服务和资源访问服务器?我正在使用带有托管标识的 Azure Functions 设置连接到 SQL 数据库并且不想允许 public 网络访问。

当拒绝 public 网络访问设置为是时,仅允许通过专用终结点的连接。当此设置为否(默认)时,客户可以使用 public 终结点(使用基于 IP 的防火墙规则或基于虚拟网络的防火墙规则)或专用终结点(使用 Azure 专用 Link)

您必须创建专用端点以将函数连接到 SQL 服务器,因为在逻辑服务器上没有任何现有专用端点的情况下,任何将拒绝 public 网络访问设置为是的尝试都会失败并出现错误消息类似于:

Error 42102
Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server.
Please set up private endpoints and retry the operation.

https://docs.microsoft.com/en-us/azure/azure-sql/database/connectivity-settings