DEV Community

CodetoLive blog
CodetoLive blog

Posted on • Originally published at codetolive.in on

Create new firewall rules for Azure SQL databases

You are receiving the following error message because your IP address (client or local) has not been added to the Azure firewall on the Azure SQL Server.

Error: mssql An error occurred while creating a new firewall rule Value cannot be null. (Parameter serverName)

If you want to grant access to your local or client IP, then follow the below steps:

  1. Go to Azure portal
  2. Select “SQL Servers” from Azure Services.
    Azure Services - SQL severs
    Fig 1. Azure Services - SQL servers

  3. Select your SQL Server from the list to which you want to add the network firewall settings.
    Azure SQL servers
    Fig 2. Azure SQL servers

  4. Select “Networking” from the left-side menu.

  5. Under the firewall rules, enter the rule name and the start and end IP addresses of your client or local machine.
    Azure SQL server - Networking
    Fig 3. Azure SQL server - Networking

  6. Save the changes.

Note: Your client IP address will change frequently unless you’re using a static IP address.

Try to connect the SQL server from your client, and it should be able to successfully connect the SQL server and access the database.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up