Ensure accessibility is restricted up to 256 hosts in Azure SQL Firewall Rule

MEDIUM

Description

Too many hosts accessing SQL Server via Azure SQL Firewall Rule may make security monitoring challenging.

Remediation

In Azure Console -

  1. Open the Azure Portal and go to SQL servers.
  2. Choose the SQL server you wish to edit.
  3. Under Networking, Set Start IPv4 address and End IPv4 address under Firewallrules.
  4. Select Save

In Terraform -

  1. In the azurerm_sql_firewall_rule resource, set start_ip_address and end_ip_address.

References:
https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure?view=azuresql
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_firewall_rule

Policy Details

Rule Reference ID: AC_AZURE_0280
CSP: Azure
Remediation Available: Yes
Resource Category: Virtual Network
Resource Type: Security Group

Frameworks