Adding your Client IP to the Azure SQL server firewall

One of the first things that need to be done when you create a Azure SQL database is adding the Client IP address to the firewall of the Azure SQL server. By default all traffic between Azure services are allowed but traffic from another machine is disallowed. Connecting to the server with for example SQL Management Studio will result in the following error:


Cannot open server [servername] requested by the login. Client with IP address [IP Address] is not allowed to access the server.




When you open the Azure SQL Database within Visual Studio it will prompt you the question if you would like to add your Client IP to the firewall in order to access the database.  If you prefer another tool like SQL Server Management studio you will have to configure this within the Azure Portal (as mentioned in the error):

  1. Open the Azure Portal:
  2. Click on Resource Groups and then the resource group of the SQL server.
  3. In the Resource Group blade click on the SQL server.
  4. Within the “Security” Category click on “Firewall”.
  5. Add your Client IP within this blade.
  6. Click on save to save the settings.


Azure SQL Firewall


Until today I navigated to the website: to retrieve my external IP and add it via the steps mentioned above but today I noticed another option (I think it already was there for quite some time). Within the firewall blade you can click on “Add client IP” to add your current client IP.


Add Client IP

Related Posts

Azure Managed Service Identity and Local Development Instead of storing user credentials of an external system in a configuration file, you should store them in the Azure Key Vault. Before MSI (Managed S...
The securitydata Azure resource group Most of the times companies have rules in place for managing their Azure environment. The main rules that should be in place are “Azure Policies” and ...
Point to Site VPN Client won’t install To connect an Azure App Service to a on-premise database you can make use of different solutions. Two of those solutions are: Hybrid Connection ...
Invoke Azure Function in your Visual Studio Team Services CI/CD pipeline A utility task is available for Visual Studio Team Services (VSTS) to invoke an http triggered Azure function. The ability to invoke a Function from y...
VSTS Extension for Azure Role Based Access Control Today I published an extension for Visual Studio Team Services (VSTS) that gives you the ability to add and remove role based access assignments in Az...
Listing Azure Services within a CSV file In some situations you will look into a current Azure Environment and the setup/governance of it and need to migrate or move resources around. The ...

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.