Establishment of connection between 2 VMs from different subnets

Saurabh Vyas 1 Reputation point
2022-05-24T05:33:12.5+00:00

I want to access the DB server of azure VM 1 ( situated on a subnet 1, resource group 1 ) from azure VM 2 (located on a subnet 2, resource group 2 ), what appropriate steps should I take?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,129 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,141 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ronen Ariely 15,096 Reputation points
    2022-05-24T06:23:43.29+00:00

    Assuming that both virtual machine has a public network (which they have if you connect to them directly from your local machine) then the simplest option is to use the connection string to remote server. It is not important if the VM is on azure or not for that step.

    Obviously you will need to open the network firewall port according to the port that your database server use

    You did not provided any information about which database you use, so we cannot provide the exact implementation of the request