Issues with mi IP address

Reinaldo Munoz 0 Reputation points
2024-07-15T07:53:30.32+00:00

Hi guys. I am doing a course about Azure and I was checking the section to connect a Blob Storage to SQL Database. When I was setting up my Firewall rules, the first issue I found was that Azure didn't recognize my IPv4 but IPv6 instead so I have to changed it and everything works perfectly. The second issue I found was when I tried to connect my Blob Storage to my SQL Database. I did everything as the course says but when I was creating the new connection and I pressed test connection, Azure gave me this issue:

"Cannot connect to SQL Database. Please contact SQL server team for further support. Server: 'abdatabase1.database.windows.net', Database: 'abdatabase', User: ''. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.

Cannot open server 'abdatabase1' requested by the login. Client with IP address '20.42.3.136' is not allowed to access the server. To enable access, use the Azure Management 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."

The thing here is that '20.42.3.136' is not my IP and I don't know why Azure is saying the '20.42.3.136' is my IP. I got a quick fix ticking the option that says "Allow Azure services and resources to access this server" but I continue wondering why those 2 issues appeared.

I would be very pleased if anyone could help me.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,804 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 25,866 Reputation points
    2024-07-15T09:18:54.6533333+00:00

    The error message you're seeing indicates that the IP address 20.42.3.136 is being blocked by the SQL Database firewall. This IP address is likely the public IP address used by the Azure service attempting to connect to your SQL Database.

    You can check a website like whatismyip.com to determine your current public IP address.

    Then you can add a new rule with your verified public IPv4 address.

    If you prefer the quick fix, ensure the option "Allow Azure services and resources to access this server" is enabled.

    You can always obtain the list of Azure Data Factory IP addresses from the Azure IP Ranges and Service Tags – Public Cloud.

    If you prefer using SQL commands to add firewall rules, you can use the following command in the master database:

    EXEC sp_set_firewall_rule N'AllowMyIP', 'YOUR_IP_ADDRESS', 'YOUR_IP_ADDRESS';
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.