How To Configure Firewall Settings To Access Azure SQL Database From Your Machine

Introduction

In my previous article, you saw how to create an Azure SQL database and how to query the Database in the Azure portal. Azure SQL Database is a relational Database-as-a-Service which provides high performance, reliable, and secure database that is used to build data-driven applications and websites.

In this blog, you will see how to create a server-level firewall rule for your client’s specific IP address to access the Azure SQL database. Also, it makes sure that outbound port 1433 is opened by which SQL database communicates. If this firewall rule has not been created, then you will face an issue when you try to access the database from any tools, as shown below.
 

Create server-level firewall rule:

Log in to the Azure Portal.

Click SQL Databases -> vijaiDB (which I have created in my previous article).

 

Click Overview and then click Set server firewall.

 

Your client IP address will be shown. Click Add client IP and then click Save button.

Note

This will not be same as what you get from ipconfig. To get your IP address, please go to https://www.whatismyip.com/.

 

 

You have successfully created a server-level firewall rule for a specific IP address.

 

Result

Thus, in this blog, you saw how to configure a server-level firewall rule for your specific IP address.