How to Configure Site-to-Site VPN Connection on Azure

This post will show you how to create a Site-to-Site VPN gateway using Azure. And I will not just stop at creating it, I will also show a test sample of the connection working. Yes, that’s how I roll, you have to see what you’re configuring working in real-time. Things to consider before creating a site-to-site VPN: If you’re unfamiliar with the IP address ranges located in your on-premises network configuration, you need to coordinate with someone who can provide those details for you. When you create this configuration, you must specify the IP address range prefixes that Azure will route to your on-premises location. None of the subnets of your on-premises network can overlap with the virtual network subnets that you want to connect to. What is Site-to-Site VPN Site-to-Site VPN gateway connection is used to connect your on-premises network to an Azure virtual network over an IPsec/IKE (IKEv1 or IKEv2) VPN tunnel. This type of connection requires a VPN device located on-premises that has an externally facing public IP address assigned to it. What is a VPN Gateway A VPN gateway is a type of virtual network gateway that sends encrypted traffic between your virtual network and your on-premises location across a public connection. You can also use a VPN gateway to send traffic between virtual networks across the Azure backbone. What is a Local Network Gateway A local network gateway is a specific object that represents your on-premises location (the site) for routing purposes. A local network gateway is used to establish a secure, encrypted connection between your on-premises network and your Azure virtual network. This enables you to extend your on-premises network to the cloud and access resources in Azure as if they were located on your local network. You give the site a name by which Azure can refer to it, then specify the IP address of the on-premises VPN device to which you’ll create a connection. You also specify the IP address prefixes that will be routed through the VPN gateway to the VPN device. The address prefixes you specify are the prefixes located on your on-premises network. What we will need to Configure the Site-to-Site VPN. Virtual Network VPN Gateway Local Gateway Connecting Routing and Remote Access If you have read my previous post about Point-to-Site VPN you should be familiar with some of them.   Creating a Virtual Network Firstly, we need to create a Virtual Network Step 1: Sign in to the Azure Portal. Step 2: Search for virtual network in Azure portal. Step 3: In the search results, select virtual network right under Marketplace. Step 4: On the Virtual network page, click on Create. Step 5: Under the Basics tab, choose the Subscription you want to use for this project. Step 6: Resource group can be selected from existing resource group, or a new resource group can be created by clicking on Create new. Step 7: Enter a preferred name for the virtual network. Step 8: Choose a preferred location for the Virtual Network, by clicking on the drop-down and selecting the region you prefer, and then click on next at the bottom. Note: The location determines where the resources that you deploy to this VNet will live. For this tutorial, we will leave the Security tab with the default settings and then click on next again. We will be using the for our address space and for the subnet we will create two subnets: abcofcloudsubnet with a subnet address space of Step 9: On the IP addresses tab click on the Add an IP address space and select the Address space type radio button for IPv4. Starting address type, Address space size use the drop-down to select /16 (65536 addresses) and click the Add button. Step 10: After this has been added you can now delete the default address space. Step 11: This is the time we add our subnet, click on the plus(+) button beside Add a subnet, and on the pop-out button by the right under the Subnet details enter a preferred name, for this tutorial I will be using abcofcloudsubnet, the Starting address as and Subnet size as /24 (256 addresses) then click on the Add button. Step 12: Click on the Review + Create button to have an overview of your settings and then click Create. Let’s Create the VPN Gateway Step 1: Search for Virtual network gateway in Azure portal. Step 2: In the Search result, under Marketplace select Virtual network gateway. Step 3: Choose the subscription you want from the drop-down. Step 4: The Resource Group will be auto-filled when we select the virtual network. Step 5: Enter any preferred name for your gateway. Step 6: We will be using VPN as the Gateway type in this tutorial. Step 7: Route-based is the VPN type we will be using for this tutorial, this can be selected based on your requirement or business need. Step 8: SKU will be VpnGw2AZ for this tutorial, I will be adding some links where you can learn more about the SKU, resizing, and zone redundant. Step 9: Generation2 will be the choice for this tutorial. Step 10: Our Virtual network will be the one we created previously. Step 11. You can either create a subnet in your virtual subnet with the name Gatewaysubnet or you get the Gateway subnet address range automatically. Step 12: We will change the default Gateway subnet address range to or larger which is (/26,/25,/24, etc.)  Anything lesser will throw an error if you’re trying to deploy a zone-redundant/zonal gateway and also this allows enough IP addresses for future changes. Step 13: Public IP address is set to Create new; you can choose to use existing if you already have one created. These settings specify the public IP address object that gets associated with the VPN gateway. The public IP address is assigned to this object when the VPN gateway is created. The only time the primary Public

How to Configure Site-to-Site VPN Connection on Azure Read More »