Windows Azure Client with IP address 'XXX.XXX.XXX.XX' is not allowed to access the server
Asked Answered
G

11

74

I have setup Sever, database and Firewall Setting (Rule) In windows Azure. I Have added The IP In firewall setting which is populating under the Windows Azure Firewall Tab.

When I am trying connect with Database using Manage from Azure Platform I am getting this error message.

Firewall check failed. Cannot open server 'XXXXXXXXX' requested by the login. Client with IP address 'XXXXXXXXX' is not allowed to access the server. To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.

And I am also Not able to connect via Sql Server Management Studio. Getting Same connection issue Error for My IP Address.

I am not using static IP but my IP haven't change during this process. I have tried lot Example but all are saying To add firewall rule That I had already done.

I have Added Firewall exception for port Number 1433.

But still this is not working Please let me know that what type of setting is still missing.

Glucoprotein answered 17/12, 2011 at 8:50 Comment(2)
See blogs.msdn.microsoft.com/azuresqldbsupport/2015/04/29/…Melonie
Above blog link worked for me thank you very much @Michael Freidgeim...Broach
E
35

If you want to manage SQL Azure from the Azure Portal you have to check the "Allow other Windows Azure Services to connect to this server". That is also required later for your Web/Worker roles deployed to Azure: enter image description here

If you want to connect from your home/work PC, you have to keep the firewall up-to-date with your public IP address! Your public IP Address is in the little popup windows, which pops out when you want to add new firewall rule:

enter image description here

Eleemosynary answered 17/12, 2011 at 13:10 Comment(1)
Just an update on this issue. We changed ISP at our office so our ip address changed too and we were unable to connect to our database. You have to login into your azure account from Tools in Visual studios. Open your database in sql explorer and you should be pront to update your ip rules.Palinode
S
53

with new version of windows azure only go to firewall settings and click on add client IP and you will be okey. see picture bellow

Suffice answered 14/10, 2015 at 16:38 Comment(2)
This is a good answer, except my breadcrumb trail shows SQL Databases > Tools > Open in Visual Studio > Firewall settingsIncluding
here is the linkPutup
E
35

If you want to manage SQL Azure from the Azure Portal you have to check the "Allow other Windows Azure Services to connect to this server". That is also required later for your Web/Worker roles deployed to Azure: enter image description here

If you want to connect from your home/work PC, you have to keep the firewall up-to-date with your public IP address! Your public IP Address is in the little popup windows, which pops out when you want to add new firewall rule:

enter image description here

Eleemosynary answered 17/12, 2011 at 13:10 Comment(1)
Just an update on this issue. We changed ISP at our office so our ip address changed too and we were unable to connect to our database. You have to login into your azure account from Tools in Visual studios. Open your database in sql explorer and you should be pront to update your ip rules.Palinode
F
27

As Azure keeps changing, so do the ways to get to the firewall. click SQL Server, then Firewall, then add the range

Click your SQL server (not the database, but the server) -> click firewall -> add the IP range you want to allow.

Dont forget to click save!

Funiculus answered 29/3, 2017 at 22:18 Comment(3)
this should be the right answer as not everyone has windows or the app installedJocularity
Is there a way to remove the limit of IP? My employee doesn't have a static IP and I need them to be able to connect to the server regardless.Deferred
@Shimmy you can add multiple rules, I would also suggest that ISP's still only have a range of IP addresses, ask your employee to find out his (big ISP's publish their ranges, smaller ones might require a phone call). You could always put the range as 0.0.0.0 to 255.255.255.255, but that really defeats the purpose of a firewall right? :) Better idea, an employer could pay the cost of a static IP, in my area its about $5 a month.Funiculus
L
6

Azure Configure Firewall

This is simply the visual to what Saurin Vala said. For whatever reason in Azure you have to click Open in Visual Studio first.

Lsd answered 29/4, 2016 at 2:19 Comment(1)
For whatever reason adding in Visual Studio was the only method that worked for meOutlet
F
5

As you may already know, Microsoft changes things all around the place in the Azure Portal, that's good as it shows they care about the UX/UI, however, it's a bit annoying for us to do things when we need.

So, currently, to edit the firewall rules for a specific SQL database instance, you follow the below steps.

Home > [Your SQL database] > Overview > Set Server firewall

or

Home > All Resources > [Search for Your SQL database] > [Your SQL database] > Overview > Set Server firewall

The image below shows the UI flow.

enter image description here

Fae answered 2/3, 2018 at 11:10 Comment(0)
T
4

If you find that you have to do this on a regular basis I would suggest installing the Windows Azure Powershell Cmdlets. Once you have those installed I've created an open source project on GitHub which provides a number of scripts of common tasks.

Changing Firewall rules just so happens to be one of those common tasks and the source can be found here: Windows Azure Powershell Extensions

In order to get these Extensions installed you can follow the instructions on my blog post SQL Azure Powershell for Developers on the Run!

In a future update I will be providing additional functionality to provide the publishsettings file instead of needing to create a CSV file of SubscriptionId and Thumbprint's for your Windows Azure Accounts.

Tenpenny answered 21/12, 2011 at 19:12 Comment(2)
Hello SyntaxC4, can't find the project on github. Do you have it somewhere else? Thanks!Heterogamy
All of the features in my project were absorbed into the Windows Azure Powershell tools. Download the newest version of the Windows Azure PowerShell CmdletsTenpenny
H
4

Login to azure Portal

select your database subscription

click on Tools

Now there is option 'Open in VisualStudio' (click on it)

You can see "Configure Firewall" click on it.

Add you new IP.

Done :)

Hyphenated answered 18/3, 2016 at 5:34 Comment(0)
I
2

Here is what I did to solve this issue. By going to Firewall Settings DB->Overview->Firewall Settingsenter image description here

Insurgence answered 29/1, 2017 at 20:52 Comment(0)
S
1

For me it was

Azure Portal (ARM)

Choose SQL databases sub folder on left or find in the more section to add.

Choose your SQL database

click firewall

inter in rule name and IP's

Sardanapalus answered 4/4, 2017 at 17:19 Comment(0)
H
1

Click on your database resource. Go to Firewall settings by clicking on set server firewall. Add the new rule and all set :) enter image description here

Hautrhin answered 25/4, 2021 at 16:38 Comment(1)
Also worth noting is that the button at the top labeled "+ Add client IP" quickly adds your current IP (whatever IP you're using to get to the portal) to the list.Warfeld
T
0

Odd Wrinkle: I used my Azure admin login to set a firewall rule for each user with their WhatIsMyIP address. Some worked, some did not. Turned out some users saw a different IP address displayed in SSMS when it offered to update the rule for them. That address always worked. I can't explain why there are different IP addresses. I just know I finally had the problem users [all non-techies] install SSMS and use it to give me the correct address.

Tracey answered 11/1, 2021 at 18:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.