Database Firewall Settings

kevin 1 Reputation point
2020-09-23T15:48:23.31+00:00

I am attempting to configure MySql firewall for container instances. I have successfully parsed the output from the CLI to get the new public ip address of the container instance, however, it does not seem to use that ip address to connect to the database, NOR does it use it's own internal up address (10.x.x.x) but it uses a 13.x.x.x.x based on the error coming back from the database server. There is no 13.x interface, so there must be some kind of transparent proxy?

Please advise.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
711 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
842 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Ubezzi 2,776 Reputation points
    2020-09-25T02:04:10.18+00:00

    Hi @kevin - Can you provide a little more information, such as if you have a VNET in-place and are you building your service from scratch or are you using a solution template? The source address that needs to be added to the Azure Database for MySQL is a public Azure address, since you are likely using the public endpoint, which is handled by a gateway service to your MySQL instance. Also, do you have "Allow access to Azure services" enabled? Please see this Stack Overflow post which walks you through the exact same issue. The solution is t set the following firewall rule: This is achieved by creating an azurerm_sql_firewall_rule having start_ip_address and end_ip_address set to "0.0.0.0"

    0 comments No comments

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.