Azure Database Access from A Different Virtual Network

Seun Ore 80 Reputation points
2024-07-01T07:47:35.6233333+00:00

Dear Azure Team,

I have an azure managed mysql database in virtual network vnet1 and a virtual machine in vnet2. I am unable to get this VM to access the database. I have a hub-spoke architecture with both vnet1 and vnet2 peered with my hub-vnet with firewall. I am not interested in peering vnet1 and vnet2. I tried to setup a FQDNs network rule in firewall but then this required that You must enable DNS Proxy on the Firewall before you can add Network rules with FQDN Destinations.

I am not very vast in azure firewall and i do not want to upset or cause disruptions to existing systems. What is the safest way to achieve this? What also is the implication of You must enable DNS Proxy on the Firewall before you can add Network rules with FQDN Destinations. In anyway, will this really solve the problem? The database is using private DNS connection string like name.mysql.database.azure.com with no public access and I'd like to maintain this status.

SeunScreenshot 2024-07-01 at 8.46.08 AM

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
681 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,522 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
853 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 47,196 Reputation points Microsoft Employee
    2024-07-01T09:32:08.8233333+00:00

    @Seun Ore ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you have a Managed mySql in vnet1 and a VM in vnet2 and these two VNETs are peered to a HubVNET which has a Azure Firewall and you would like to establish Transit connectivity between the Spokes VNET1 and VNET2.

    Before Troubleshooting for VNET2, I would suggest you to make sure VMs in VNET1 are able to reach and access the database.

    • Can you confirm if the VMs in VNET1 work with the Database?

    For Transit connectivity,

    • I believe the service you are using is Azure Database for MySQL - Flexible Server
      • Correct me if I am wrong
    • Can you confirm if UDRs are associated to both the subnet of the VM and the subnet of the managed database with a route 0.0.0.0/0 pointing to Azure Firewall IP ?
    • In the network rules, may I ask why you are planning to use a FQDN instead of IP Address?
      • From the VM, please run *nsolookup name.mysql.database.azure.com *and share the results
      • From the VM, please run *ping name.mysql.database.azure.com *and share the results

    Cheers,

    Kapil

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.