Other Articles

SQL Database – Protect From Direct Internet Traffic

This check ensures that Azure SQL Servers and Databases are not exposed directly to the public internet. Restricting public access reduces the attack surface and protects databases from unauthorized access and external threats.

Check Details

  • Resource: SQL Server / SQL Database
  • Check: Protect SQL Databases From Direct Internet Traffic
  • Risk: Publicly accessible SQL databases are vulnerable to brute-force attacks, data breaches, and compliance violations.

Remediation via Azure Portal

  1. Log in to the Azure Portal. Azure Portal dashboard
  2. Navigate to Azure SQL Database.
  3. Under SQL databases, choose the affected database. SQL databases list
  4. From the left-hand menu, go to Networking under Security. SQL Server networking menu
  5. Under Public network access, Disable to block all public access. SQL public network access settings
  6. Click Save to apply the configuration.

Remediation via Azure CLI

  1. Open Azure Cloud Shell or use a local terminal with Azure CLI installed. Azure Cloud Shell
  2. Disable public network access for the SQL Server:
    az sql server update \
     --name <sql-server-name> \
     --resource-group <resource-group-name> \
     --public-network-access Disabled
    

Replace <sql-server-name> and <resource-group-name> with your actual values. This ensures SQL databases are protected from direct internet traffic.