DEV Community

Cover image for Site to Site setup in Azure
Sulagna Nandi
Sulagna Nandi

Posted on

Site to Site setup in Azure

Site to site is an amazing concept introduced in every cloud platform. Site to site , as the name suggests is a technique in which one site (on-cloud) is connected to a second site (on-premises).
There are many such situations when we will require to setup such a situation where our on-premises servers can communicate with cloud virtual machines or servers safely and securely.
The solution to such a setup is creating a Site to Site connection.

Below, I have shown all the steps you need to configure at the Azure side to set a Site-to-Site connection. After following the steps you will get a configuration file which will be handed to the network manager of the on-premises server and complete setup will be done.

Components required for this setup are:

  1. Virtual network with a default defined subnet and a Gateway subnet.
  2. Virtual network gateway
  3. Local network gateway

Step- 1: Create a Virtual network with a default subnet
Specify the Virtual network IP address and create the Virtual network with a default subnet. I have created the Virtual network with IP as 10.0.0.0/16 and subnet with 10.0.1.0/24 . The final details will be shown as follows:

Virtual network

Step- 2: Add the Gateway Subnet to this Network
To add Gateway Subnet, Go to Subnets >> Click on the "+Gateway subnet" >> Now specify the address for it and click on Add.

Gateway

Step- 3: Create a Local Network Gateway
Here, all the specifications of your on-premises server is added.
Since, this is just for tutorial purpose I don't have a on-premises server, I am using some random IP address. In real situation you have to specify the Static IP address of the on-premises server or the Fully Qualified Domain Name
The final configuration should look like this:

Local gateway

Step- 4: Create Virtual Network Gateway
Search for Virtual Network Gateway and select the Virtual network created. Select other options as required or leave to Default.
Final configurations for reference:

VPN gateway

VPN gateway 2

Step- 5: Create a Connection
Inside the Virtual Network gateway resource , Select Connections. Then Select Add connection.

Connection

Next specify the connection details and choose Site to Site in the connection type. Next you need to specify the Shared Access Key of your on-premises server. After successfully completing the steps you will find a configuration file. Download this and provide to the network engineers on the other side

Connection

That was all the steps for setting a Site to Site connection.

Top comments (0)