我要使用ARM或powershell将set Azure SQL Server Firewall设置为Off。
一种可能的解决方案是在ARM中将起始和结束IP设置为255.255.255.255。我还尝试从用于创建防火墙规则的ARM模板文件中删除块。但是,即使这样也没有帮助。
但是,我想知道有没有其他方法?
发布于 2018-12-06 16:42:30
这是尽可能简单的。不知道我怎么没看出来。无论如何,对于那些坚持同样的事情的人来说。以下是关闭防火墙的选项。
”-RuleName -ServerName
发布于 2018-12-06 15:44:29
不是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"
}
}
发布于 2018-12-06 15:46:57
有关powershell的详细信息,请参阅here
启用:
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'
https://stackoverflow.com/questions/53646623
复制相似问题