SQL Databases allows ingress from `0.0.0.0/0`TF-S1011
Allowing ingress from 0.0.0.0/0 means that the SQL database can accept connection requests from all the IP addresses. This can lead to allowing unauthorized connections too.
SQL Server includes a firewall to block access to unauthorized connections. More granular IP addresses can be defined by referencing the range of addresses available from specific data centers.
By default, for a SQL server, a Firewall exists with StartIP
of 0.0.0.0
and EndIP
of 0.0.0.0
, allowing access to all the Azure services. Additionally, a custom rule can be set up with StartIP
of 0.0.0.0
and EndIP
of 255.255.255.255
, allowing access from ANY IP over the Internet.
In order to reduce the potential attack surface for a SQL server, firewall rules should be defined with more granular IP addresses by referencing the range of addresses available from specific datacenters. By default, setting "Allow" access to Azure Services is set to ON, allowing access to all Windows Azure IP ranges.