Q97. How to Configure the SQL Database firewall?

SQL Database firewall helps to protect your data in the database. The firewall allows access to only to those requests which are originating from the IP addresses which we specify while configuring the firewall. To configure the firewall click on SQL Databases in the navigation pane of the Windows Azure portal. Next, click on Servers option at the top of the page.

screen display servers

Next, click on the server to open the server page as shown below.

server page

On the server page, click Configure option to open the firewall configuration settings dialog. In this dialog, specify the rules. Each rule has a name, Start IP Address and End IP Address. Any request originating within this range is allowed to access SQL Database.

firewall configuration settings dialog

Note: Current client IP address - This is the IP address of the computer from where you have accessed the Azure portal. SQL Database automatically detects this IP address and displays it. Click on the right arrow to create your first rule. From here on, you can create more rules by specifying the Start IP Address and End IP Address. Once you save these settings, connection requests from your local computer can access SQL Database in the Cloud. The connection requests from the applications or SQL Server management studio or Visual studio can also connect to SQL Database in the Cloud.

By default, SQL Database firewall prevents all access to the SQL Database server unless you configure the firewall and specify which computers should have permission to access the SQL Database server.

The SQL Database service is only available with TCP port 1433 used by the TDS protocol, so make sure that the firewall on your network and local computer allow outgoing TCP communication on port 1433.