Step 9: Creating the VPN

The VPN (Virtual Private Network) connection links your local network to your AWS VPC. This step involves creating three components: Customer Gateway, Virtual Private Gateway, and VPN Connection.

Overview of VPN Components

Component Description
Customer Gateway Represents your local router in AWS
Virtual Private Gateway The AWS-side VPN endpoint
VPN Connection The tunnel linking both gateways

Create a Customer Gateway

  1. Navigate to VPC Dashboard and select Customer Gateways.
  1. Click Create Customer Gateway.
  1. Enter the following settings:
Setting Value
Name tag My-Company-CGW
Routing Static
IP Address Your router's public/WAN IP address
  1. Click Create Customer Gateway.

Important: The IP address must be a static public IP assigned by your ISP. Contact your Internet Service Provider if you need to request a static IP assignment.

Create a Virtual Private Gateway

  1. Navigate to VPC Dashboard and select Virtual Private Gateways.
  1. Click Create Virtual Private Gateway.
  1. Enter the name tag: My-Company-VGW
  1. Click Create Virtual Private Gateway.
  1. Select the newly created gateway.
  1. Click Actions and select Attach to VPC.
  1. Select My-Company-VPC and click Attach.

Create the VPN Connection

  1. Navigate to VPC Dashboard and select VPN Connections.
  1. Click Create VPN Connection.
  1. Enter the following settings:
Setting Value
Name tag My-Company-VPN
Virtual Private Gateway My-Company-VGW
Customer Gateway My-Company-CGW
Routing Options Static
Static IP Prefixes 192.168.1.0/24
  1. Click Create VPN Connection.

Important: The Static IP Prefixes value represents your local network subnet. The example uses 192.168.1.0/24. You must change this to reflect your actual local network subnet.

Understanding the VPN Tunnels

AWS creates two VPN tunnels for redundancy. Each tunnel has:

  • Unique outside IP addresses (AWS public endpoints)
  • Inside IP addresses for tunnel communication
  • Pre-shared keys for authentication

You will configure your router to connect to at least one of these tunnels.


Related Topics

← Back to Index