Monitor Activity Log Alert should exist for Create or Update or Delete SQL Server Firewall Rule

Description

Create an activity log alert for the Create or Update or Delete SQL Server Firewall Rule event. Monitoring for Create or Update or Delete SQL Server Firewall Rule events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.

Portal Remediation Steps

  • Navigate to Monitor > Alerts.

  • Select New alert rule.

  • Under Scope, click Select Resource.

  • Select your subscription and click Done.

  • Under Condition, click Select Condition.

  • In the search, enter the term “Create/Update server firewall rule” and select “Create/Update server firewall rule (Microsoft.Sql/servers/firewallRules).”

  • Select Done.

  • Under Action group, click Select action group.

  • Select the desired action group to attach to the alert rule, or create one if needed, and click Select.

  • Enter an alert rule name and description.

  • Select a resource group.

  • Click Create alert rule.

CLI Remediation Steps

  • Create a Monitor Activity Log Alert for Create or Update SQL Server Firewall Rule, replacing <resource_group_name>, <subscription_id>, and <action_group> with your own values:

az monitor activity-log alert create --name createUpdateSQLServerFirewallRule \
  --resource-group <resource_group_name> \
  --condition category="Administrative" and \
  operationName="Microsoft.Sql/servers/firewallRules/write" \
  --scope "/subscriptions/<subscription_id>" \
  --action-group <action_group>