Skip to content

AWS virtual private gateway with redundant tunnels

Connect a Vipilink network to an Amazon VPC with two IPsec tunnels, one from each of two Vipilink gateways to the same AWS virtual private gateway. If one tunnel or gateway goes down, traffic keeps flowing through the other.

BGP runs over the tunnels for redundancy and failover. You still add static routes on both sides, as shown in Step 5 and Step 7.

Before you start

  • A Vipilink network with two active gateways. They can be in different regions, for example New Jersey and Miami.
  • An Amazon VPC, and permission to create VPN resources in it.
  • The Vipilink network subnet and the VPC CIDR must not overlap.

For a setup with one gateway, see AWS virtual private gateway.

Example used on this page

Item Example value
Vipilink network Cloud, subnet 10.14.0.0/16
Vipilink gateways New Jersey and Miami
AWS Region US East (N. Virginia)
Amazon VPC app-vpc, CIDR 10.50.0.0/16

AWS resources created for the Vipilink connection get names that start with vipilink-. You create one customer gateway and one VPN connection for each Vipilink gateway.

All the AWS pages used below are in the VPC console, in the left menu under Virtual private network (VPN).

VPC console left menu with the VPN pages highlighted

Step 1: Create and attach a virtual private gateway

If you already have a virtual private gateway attached to your VPC, you can use it and skip this step.

  1. In the AWS console, open VPC and go to Virtual private network (VPN) → Virtual private gateways.
  2. Click Create virtual private gateway, enter a Name tag such as vipilink-vgw, keep Amazon default ASN and click Create virtual private gateway.

    Virtual private gateways page with Create virtual private gateway highlighted

    Create virtual private gateway form

  3. Select the gateway, click Actions → Attach to VPC, choose your VPC and click Attach to VPC.

    Actions menu with Attach to VPC highlighted

Step 2: Create two customer gateways

Each customer gateway represents one Vipilink gateway.

  1. In the Vipilink console, open your network and note the public IP of each gateway.
  2. In the AWS console, go to Virtual private network (VPN) → Customer gateways and click Create customer gateway.

    Customer gateways page with Create customer gateway highlighted

  3. Create the first customer gateway:

    Field Value
    Name tag vipilink-gw-new-jersey
    BGP ASN 64520
    IP address Public IP of the first Vipilink gateway

    Create customer gateway with name, BGP ASN and IP address highlighted

  4. Repeat for the second gateway, for example vipilink-gw-miami, with BGP ASN 64520 and the public IP of the second Vipilink gateway.

    Customer gateways list with both gateways

BGP ASN 64520

Vipilink gateways use ASN 64520. The customer gateways must use the same number, or BGP will not come up.

Step 3: Create two Site-to-Site VPN connections

Create one VPN connection for each customer gateway.

  1. Go to Virtual private network (VPN) → Site-to-Site VPN connections and click Create VPN connection.

    VPN connections page with Create VPN connection highlighted

  2. Fill in the form:

    Field Value
    Name tag vipilink-vpn-new-jersey
    Target gateway type Virtual private gateway
    Virtual private gateway vipilink-vgw
    Customer gateway Existing, then choose vipilink-gw-new-jersey
    Routing options Dynamic (requires BGP)

    Leave the other fields at their defaults.

    Create VPN connection with dynamic routing selected

  3. Expand Tunnel 1 options, choose Edit tunnel 1 options and set DPD timeout (seconds) to 60.

    DPD timeout set to 60 seconds

  4. Click Create VPN connection.

  5. Repeat for the second customer gateway, for example vipilink-vpn-miami.

Wait until both connections show Available.

VPN connections list with both connections available

Step 4: Download both configuration files

  1. Select the first VPN connection (1) and click Download configuration (2).

    VPN connection selected and Download configuration highlighted

  2. Choose Generic, Generic, Vendor Agnostic and ikev2, then click Download.

    Download configuration dialog with Generic options selected

  3. Repeat for the second VPN connection. Rename the files so you know which gateway each one belongs to, for example add -new-jersey and -miami to the names.

Keep the files private

The configuration files contain the tunnel pre-shared keys. Store them somewhere safe and delete them when you are done.

  1. Go to Virtual private cloud → Route tables (1) and select the route table used by your VPC subnets (2).
  2. Open the Routes tab (3) and click Edit routes (4).

    Route tables page with the menu item, route table, Routes tab and Edit routes numbered

  3. Click Add route:

    • Destination: your Vipilink network subnet, for example 10.14.0.0/16
    • Target: Virtual Private Gateway, then choose vipilink-vgw
  4. Click Save changes.

Edit routes with the Vipilink subnet routed to the virtual private gateway

  1. In the Vipilink console, open your network. On either gateway card, click the ... menu and choose Add Tunnel.

    Gateway menu with Add Tunnel highlighted

  2. Choose IPsec Site-to-Site Tunnel (1) and click Continue. Then choose Dual-Tunnel (2) and click Continue.

    Tunnel protocol and tunnel type selection

    Tip

    Dual-Tunnel is only available when the network has at least two gateways.

  3. Enter a Tunnel Name, for example AWSDual. Use letters and numbers only. Vipilink names the two tunnels AWSDual 1 and AWSDual 2.

  4. In the first tunnel section, click Upload and select the first configuration file. Then choose the matching Vipilink gateway in Gateway.

    First tunnel section after uploading the New Jersey file

  5. In the second tunnel section, upload the second file and choose the second Vipilink gateway.

    Second tunnel section after uploading the Miami file

    Vipilink fills in the pre-shared key, internal IPs, remote public IP, remote AS number and remote ID from each file.

    Match each file to its gateway

    Each file belongs to the customer gateway you created for one Vipilink gateway. If you pick the wrong gateway for a file, that tunnel will not come up.

  6. In Shared Settings, keep Vipilink Side Subnets and Remote Side Subnets set to Any. The Vipilink ASN is fixed at 64520.

    Shared Settings with both sides set to Any

  7. Keep the Advanced Settings defaults: IKE V2, IKE lifetime 8h, tunnel lifetime 1h, DPD 10s / 30s, aes256, sha256 and group 14.

  8. Click Add Tunnel.
  1. On the network card, click the ... menu and choose Route Table.

    Network menu with Route Table highlighted

  2. Click Add Routes, choose the dual tunnel, enter the VPC CIDR (for example 10.50.0.0/16) and click Add Routes.

    Add Routes dialog with the dual tunnel and VPC subnet

  3. The route appears in the table with the type Manual. It covers both tunnels.

    Route Table with the AWS route on the dual tunnel

Step 8: Check the connection

  1. In the Vipilink console, both tunnel cards show Up.

    Both dual tunnel cards showing Up

  2. In the AWS console, open Tunnel details for each VPN connection. One tunnel shows Up with BGP routes in Details.

    AWS tunnel details with one tunnel up and BGP routes

    One tunnel per VPN connection shows Down

    This is expected. AWS creates two tunnels for every VPN connection, and each Vipilink gateway uses one of them. AWS also shows a banner saying the connection is not using both tunnels. Redundancy comes from the two VPN connections and the two Vipilink gateways.

  3. Connect a device to the network with the Vipilink agent and reach a resource in the VPC, for example with ping or SSH to a private IP.

    Terminal pinging a private AWS IP while connected to the Cloud network

Troubleshooting

Problem What to check
A tunnel stays Down The customer gateway IP matches that Vipilink gateway's public IP. The file uploaded in that section belongs to that gateway's VPN connection. The customer gateway BGP ASN is 64520.
Tunnels are Up but nothing responds Routes exist on both sides (Step 5 and Step 7). Security groups and network ACLs in AWS allow traffic from the Vipilink network subnet. Vipilink firewall rules allow the traffic.