Reputation: 261
I want to set set Azure SQL Server Firewall Off either using ARM or powershell.
One possible solution is setting the start and end IP to 255.255.255.255 in ARM. I also tried removing the block from ARM template file which is used to create the firewall rules. But, even that didn't help.
But, I want to know if there is any other way to do it?
Upvotes: 3
Views: 863
Reputation: 261
It was just as simple as it could be. Not sure how i did not see it. Anyways, for those who stuck with the same thing. Here are the options to turn the Firewall Off.
Upvotes: 1
Reputation: 29950
For powershell, details refer to here:
turn on:
New-AzureRmSqlServerFirewallRule -ResourceGroupName 'resourcegroup1' -ServerName 'Contoso' -FirewallRuleName "ContosoFirewallRule" -StartIpAddress '192.168.1.1' -EndIpAddress '192.168.1.10'
turn off:
Remove-AzureRmSqlServerFirewallRule –FirewallRuleName 'ContosoFirewallRule' –ServerName 'Contoso' -ResourceGroupName 'xxx'
Upvotes: 0
Reputation: 72171
its not 255.255.255.255, its 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"
}
}
Upvotes: 0