Overview
In this blog we will be going throgh how we can configure a site2site vpn connection between AWS and Azure to make a private communication between them. The above figure is the architecture we will be implementing.
Implementation
First we will configure the Azure part and we will move to AWS
Create An Azure Virtual Network (VNET)
In azure first create a resource group and create VNET with CIDR range 172.10.0.0/16 and one subnet with CIDR range 172.10.1.0/24
Create Gateway Subnet
Create Gateway Subnet with CIDR range 172.10.5.0/27. Gateway subnet in the VNet is needed to configure an Azure VPN Gateway.
Create Azure Virtual Network Gateway
Now we can create a virtual network gateway. This may take some time to create.
We have setup Azure configuration now moving towards AWS part
Create An AWS Virtual Private Network (VPC)
Now come to AWS side and create a VPC with CIDR range 192.16.0.0/16
create subnet with CIDR range 192.16.1.0/24. Associate the subnet by going to the route table.
Create Customer Gateway
Goto customer gateway section in the console and click on it, and in IP address place, give the Public IP Azure Virtual Network Gateway.
Create AWS Virtual Private Gateway
Create a Site-to-Site VPN
create a VPN connection by clicking on VPN connection from the panel. Select Routing Option is Static and add Azure VPC CIDR range.
After, VPN is successfully created, download the configuration for the vpn and you need to select the vendor as Generic. With this configuration file will setup Local Network Gateway in Azure.
We now again continue to the Azure part of configuration
Create Azure Local Network Gateway
Now create 2 local network gateways for high availability.
From configuration select the public ip address and give aws vpn that public ip.
Create a Connection
Add new connection by selecting Local network gateway , shared keys and configuration as required.
configure routes
Create route table in Azure .
Add a new route to a CIDR range of AWS VPC and pointing to the Virtual Network Gateway.
Create route table in aws
Follow the same procedure as above and add a route to the CIDR of azure vpc pointing to the virtual private gateway.
Conclusion
After following the above pocedures your sitetosite vpn . To check if there is network communication between the two vpc and vnet deploy instances without public ip in both subnets and check for connection using, rdp telnet and so on.
Top comments (0)