This section provides an overview and detailed step-by-step instructions for using AWS Site-to-Site VPN and AWS Transit Gateway as a means to quickly and securely establish network connectivity between your on-premises and AWS environments.
Assuming that you’ll want to enable your development, test, and production VPCs to have newtork connectivity to your on-premises environment, it’s recommended that you use an AWS Site-to-Site VPN connection in conjunction with the AWS Transit Gateway service. By doing so, you’ll be able to easily reuse your site-to-site VPN connection across your VPCs.
In the following diagram, your on-premises IPsec-capable VPN device is represented as the “Customer Gateway”. Your customer gateway device will initiate a site-to-site VPN connection using two IPsec tunnels with VPN Transit Gateway attachment in your Network AWS account.
Initially, you’ll configure your AWS Tranit Gateway to attach to your development VPC. Later in this guide, you’ll add attachments for your emerging set of test and production VPCs.
Earlier in this guide, you established a centrally managed development VPC in your Network AWS account. In this section, you’ll be connecting that VPC to your on-premises network via an AWS Transit Gateway and an AWS Site-to-Site VPN connection.
…insert enhanced networking diagram here showing common dev VPC attached to TGW…
Later in this guide, when you set up your test and production VPCs, the steps required to enable those VPCs to reuse your site-to-site VPN conection will be addressed. The process in your AWS environment will be largely a repeat of the steps in this section that are used to connect your development VPC to your on-premises network.
…insert enhanced networking diagram here showing test and production VPCs attached to TGW…
Via your on-premises router and firewall configurations, you should be able to limit the connectivity between your AWS VPCs and on-premises networks and services. For example, you may want to constrain resources in your development VPC to accessing only allowed infrastructure, builder services, and development quality on-premises services and data. Similarly, you would likely need to constrain your production VPC to accessing only allowed on-premises production services and data.
Using redundant Site-to-Site VPN connections to provide failover: Once you’ve established your initial AWS Site-to-Site VPN connection, it’s recommended that you consider setting up a a second customer gateway to further enhance resiliency of your network connectivity to AWS. See Resilience in AWS Site-to-Site VPN for details.
First, ensure that the following pre-requisites are satisfied.
In order to effect the necessary on-premises network configuration changes required by your AWS Site-to-Site VPN connection, you’ll need to engage your Network team. It’s recommended that you review the overall requirements and solution design with them before proceeding with the configuration work.
When you initially established your common development VPC, it was recommended that you use an IP range for CIDR block that does not overlap with other CIDR blocks in use by your organization.
If you were not able to obtain a non-overlapping CIDR block or blocks for your AWS environment, it’s recommended that you attempt to do so before proceding further.
Otherwise, you’ll need to prepare to perform some extent of Network Address Translation (NAT) in your on-premises environmnet to manage the use of overlapping IP address ranges.
In your on-premises environment, you will need to identify a static public IP address that will be associated with your Customer Gateway that will act as the on-premises side of the VPN site-to-site connection. You’ll use this IP address in the subsequent steps when you register your Customer Gateway in your AWS environment.
You will begin by making changes in the network-prod
account you set up earlier.
network-prod
AWS accountManagement console
associated with the AWSAdministratorAccess
role.VPC
and click on Customer Gateways
in the left navigationCreate Customer Gateway
Field | Recommendation |
---|---|
Name |
example-network-on-prem-01 |
Routing |
Dynamic Routing |
BGP ASN |
6500 |
IP Address |
Enter the value of the public IP Address of your on-premises gateway address for your VPN |
Certificate ARN |
Leave empty |
Device |
Leave empty |
Customer Gateway ID: Note the Customer Gateway ID for the newly created Customer Gateway. You will use this in later steps.
VPN Console
administration, click on Transit Gateways
in the left navigationCreate Transit Gateway
Field | Recommendation |
---|---|
Name tag |
acme-network-tgw-01 |
Description |
Transit Gateway in order to route traffic to/from On-Prem network as well as within VPCs |
Transit Gateway ID: Please note down the Transit Gateway ID for the recently created Transit Gateway. You will use this in later steps.
VPN Console
administration, click on Transit Gateway Attachments
in the left navigationCreate Transit Gateway Attachment
Field | Recommendation |
---|---|
Transit Gateway ID |
Select value from dropdown that matched the ID of the Transit Gateway you just created. |
Attachment Type |
VPN |
Customer Gateway |
Existing |
Customer Gateway ID |
Select value from dropdown that matched the ID of the Customer Gateway you just created. |
Routing options |
Dynamic (requires BGP) |
Transit Gateway Attachment Name: Once created, it is recommended to provide a name to the Transit Gateway Attachment. To do this, select the checkbox of the row for the attachment you just created. Click the pencil
icon under the Name
column. Enter a name (i.e. acme-routing-tgw-vpn-01).
VPN: As a result of the VPN attachment being provisioned, you will notice that a Site-to-Site VPN Connection resource has been created for the attachment.
VPN Console
administration, click on Site-to-Site VPN Connections
in the left navigationActions
button and select Modify VPN Connection
Download Configuration
VPN Configuration: Select your Vendor, Platform, and Software from the dropdowns. If you specific vendor is not available, select Generic
. As a best practice, AWS provides your configuration file with a primary and secondary VPN configuration. This allows for redundancy of your VPN connection.
Once your VPN is configured on-premises, navigate back to the Site-to-Site VPN Connections within the VPC console. Select the row of your VPN connection. At the botton of the page, select the Tunnel Details
tab. Verify that the Status has changed from “DOWN” to “UP” (this may take a few minutes).
VPN Console
administration, click on Transit Gateway Attachments
in the left navigationCreate Transit Gateway Attachment
Field | Recommendation |
---|---|
Transit Gateway ID |
Select value from dropdown that matched the ID of the Transit Gateway you just created. |
Attachment Type |
VPC |
DNS support |
enable (checked) |
VPC ID |
Select the value form the dropdown for that matches thee ID of the dev VPC in your account. |
Subnet IDs |
Select a subnet from each availability zone - preferrably a private subnet |
VPN Console
administration, click on Route Tables
under Virtual Private Cloud in the left navigationRoutes
tab at the bottom of the page and click Edit routes
Field | Recommendation |
---|---|
Destination |
Fill in with your on-premises CIDR range (i.e. 172.31.0.0/16 |
Target |
Select value from dropdown that matched the ID of the Transit Gateway you just created. |
On-premises VPN Routes: You will need to make similar types of changes to the routing rules with your on-premises infrastructure in order to route to the reserved CIDR ranges you have allocated for your AWS environment(s).
…