![](/img/trans.png)
[英]Whitelist the outbound IP address of an Azure Web App in the Azure SQL server firewall settings using ARM templates
[英]Set Azure SQL Server Firewall Off using either ARM or powershell
我想使用ARM或Powershell将Azure SQL Server防火墙设置为“关闭”。
一种可能的解决方案是在ARM中将起始IP和结束IP设置为255.255.255.255。 我还尝试从用于创建防火墙规则的ARM模板文件中删除该块。 但是,即使那样也没有帮助。
但是,我想知道是否还有其他方法可以做到?
它是如此简单。 不知道我怎么没看到它。 无论如何,对于那些坚持同一件事的人。 以下是关闭防火墙的选项。
它不是255.255.255.255,而是0.0.0.0 :)
{
"apiVersion": "2018-06-01-preview",
"name": "AllowAllWindowsAzureIps",
"type": "firewallRules",
"location": "[variables('location')]",
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
}
对于powershell,详细信息请参见此处 :
打开:
New-AzureRmSqlServerFirewallRule -ResourceGroupName 'resourcegroup1' -ServerName 'Contoso' -FirewallRuleName "ContosoFirewallRule" -StartIpAddress '192.168.1.1' -EndIpAddress '192.168.1.10'
关掉:
Remove-AzureRmSqlServerFirewallRule –FirewallRuleName 'ContosoFirewallRule' –ServerName 'Contoso' -ResourceGroupName 'xxx'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.