VPC Nag PDF
VPC Nag PDF
VPC Nag PDF
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Amazon Virtual Private Cloud Network Administrator Guide
Table of Contents
Welcome ........................................................................................................................................... 1
Your Customer Gateway Device ............................................................................................................ 2
What Is a Customer Gateway Device? ........................................................................................... 2
Your Role .......................................................................................................................... 4
Overview of Setting Up a VPN Connection .................................................................................... 4
Network Information .......................................................................................................... 4
Routing Information ........................................................................................................... 5
AWS VPN CloudHub and Redundant Customer Gateways ................................................................ 5
Configuring Multiple VPN Connections to Your VPC ........................................................................ 6
Customer Gateway Devices We've Tested ...................................................................................... 7
Requirements for Your Customer Gateway Device .......................................................................... 8
Configuring a Firewall Between the Internet and Your Customer Gateway Device .............................. 11
Example: Check Point Device using BGP .............................................................................................. 13
High-Level View of the Customer Gateway .................................................................................. 13
Configuration File ..................................................................................................................... 14
Configuring the Check Point Device ............................................................................................ 14
Step 1: Configure the Tunnel Interfaces .............................................................................. 15
Step 2: Configure BGP ...................................................................................................... 16
Step 3: Create Network Objects ......................................................................................... 16
Step 4: Create a VPN Community and Configure IKE and IPsec ............................................... 17
Step 5: Configure the Firewall ............................................................................................ 19
Step 6: Enable Dead Peer Detection and TCP MSS Clamping .................................................. 19
How to Test the Customer Gateway Configuration ........................................................................ 20
Example: Check Point Device (without BGP) ......................................................................................... 23
High-Level View of the Customer Gateway .................................................................................. 23
Configuration File ..................................................................................................................... 24
Configuring the Check Point Device ............................................................................................ 25
Step 1: Configure Tunnel Interface ..................................................................................... 25
Step 2: Configure the Static Route ..................................................................................... 26
Step 3: Create Network Objects ......................................................................................... 28
Step 4: Create a VPN Community and Configure IKE and IPsec ............................................... 29
Step 5: Configure the Firewall ............................................................................................ 30
Step 6: Enable Dead Peer Detection and TCP MSS Clamping .................................................. 31
How to Test the Customer Gateway Configuration ........................................................................ 32
Example: Cisco ASA Device ................................................................................................................ 35
A High-Level View of the Customer Gateway ............................................................................... 35
An Example Configuration ......................................................................................................... 36
How to Test the Customer Gateway Configuration ........................................................................ 40
Example: Cisco ASA Device with VTI and BGP ...................................................................................... 42
A High-Level View of the Customer Gateway ............................................................................... 42
Example Configuration .............................................................................................................. 43
How to Test the Customer Gateway Configuration ........................................................................ 49
Example: Cisco ASA Device with VTI (without BGP) ............................................................................... 51
A High-Level View of the Customer Gateway ............................................................................... 51
Example Configuration .............................................................................................................. 52
How to Test the Customer Gateway Configuration ........................................................................ 57
Example: Cisco IOS Device ................................................................................................................. 59
A High-Level View of the Customer Gateway ............................................................................... 60
A Detailed View of the Customer Gateway and an Example Configuration ........................................ 61
How to Test the Customer Gateway Configuration ........................................................................ 67
Example: Cisco IOS Device (without BGP) ............................................................................................ 70
A High-Level View of the Customer Gateway ............................................................................... 70
A Detailed View of the Customer Gateway and an Example Configuration ........................................ 71
How to Test the Customer Gateway Configuration ........................................................................ 77
iii
Amazon Virtual Private Cloud Network Administrator Guide
iv
Amazon Virtual Private Cloud Network Administrator Guide
v
Amazon Virtual Private Cloud Network Administrator Guide
Welcome
Welcome to the AWS Site-to-Site VPN Network Administrator Guide. This guide is for customers who
plan to use an AWS Site-to-Site VPN connection with their virtual private cloud (VPC). The topics in this
guide help you configure your customer gateway device, which is the device on your side of the VPN
connection.
Although the term VPN connection is a general term, in this documentation, a VPN connection refers
to the connection between your VPC and your own on-premises network. Site-to-Site VPN supports
Internet Protocol security (IPsec) VPN connections. For a list of customer gateway devices that we have
tested with, see the section called “Customer Gateway Devices We've Tested” (p. 7).
The VPN connection lets you bridge your VPC and IT infrastructure. You extend your existing security
and management policies to EC2 instances in your VPC as if they were running within your own
infrastructure.
1
Amazon Virtual Private Cloud Network Administrator Guide
What Is a Customer Gateway Device?
The following diagram shows your network, the customer gateway, the VPN connection that goes to
the virtual private gateway, and the VPC. There are two lines between the customer gateway device
and virtual private gateway because the VPN connection consists of two tunnels to provide increased
availability for the Amazon VPC service. If there's a device failure within AWS, your VPN connection
automatically fails over to the second tunnel so that your access isn't interrupted. From time to time,
AWS also performs routine maintenance on the virtual private gateway, which may briefly disable one
of the two tunnels of your VPN connection. Your VPN connection automatically fails over to the second
tunnel while this maintenance is performed. When you configure your customer gateway, it's therefore
important that you configure both tunnels.
2
Amazon Virtual Private Cloud Network Administrator Guide
What Is a Customer Gateway Device?
You can create additional VPN connections to other VPCs using the same customer gateway device. You
can reuse the same customer gateway IP address for each of those VPN connections.
When you create a VPN connection, the VPN tunnel comes up when traffic is generated from your side
of the VPN connection. The virtual private gateway is not the initiator; your customer gateway device
must initiate the tunnels. AWS VPN endpoints support rekey and can start renegotiations when phase 1
is about to expire if the customer gateway device hasn't sent any renegotiation traffic.
For more information about the components of a VPN connection, see VPN Connections in the AWS Site-
to-Site VPN User Guide.
To protect against a loss of connectivity if your customer gateway device becomes unavailable, you
can set up a second VPN connection. For more information about redundant connections, see Using
Redundant VPN Connections to Provide Failover in the AWS Site-to-Site VPN User Guide.
3
Amazon Virtual Private Cloud Network Administrator Guide
Your Role
Your Role
Throughout this guide, we refer to your company's integration team, which is the person (or persons)
at your company working to integrate your infrastructure with Amazon VPC. This team (which may or
may not consist of you) must use the AWS Management Console to create a VPN connection and get the
information that you need for configuring your customer gateway. Your company might have a separate
team for each task (an integration team that uses the AWS Management Console). They might have a
separate network engineering group that has access to network devices and configures the customer
gateway. This guide assumes that you're someone in the network engineering group who receives
information from your company's integration team so you can then configure the customer gateway
device.
1. Designate an appliance to act as your customer gateway device. For more information, see
Customer Gateway Devices We've Tested (p. 7) and Requirements for Your Customer Gateway
Device (p. 8).
2. Get the necessary Network Information (p. 4), and provide this information to the team to create
the VPN connection in AWS.
3. Create the VPN connection in AWS and get the configuration file for your customer gateway. For more
information about how to configure an AWS VPN connection, see Setting Up an AWS VPN Connection
in the AWS Site-to-Site VPN User Guide.
4. Configure your customer gateway device using the information from the configuration file. Examples
are provided in this guide.
5. Generate traffic from your side of the VPN connection to bring up the VPN tunnel.
Network Information
To create a VPN connection in AWS, you need the following information.
Item Comments
Customer gateway vendor (for example, Cisco), This information is used to generate a
platform (for example, ISR Series Routers), and configuration file for the customer gateway
software version (for example, IOS 12.4) device.
The internet-routable IP address for the customer The value must be static. If your customer
gateway device's external interface. gateway device resides behind a device
performing network address translation (NAT),
use the public IP address of the NAT device.
4
Amazon Virtual Private Cloud Network Administrator Guide
Routing Information
Item Comments
Instead, use a different IP address that is not in
use.
(Optional) Border Gateway Protocol (BGP) You can use an existing ASN assigned to your
Autonomous System Number (ASN) of the network. If you don't have one, you can use
customer gateway. a private ASN in the 64512–65534 range.
Otherwise, we assume that the BGP ASN for the
customer gateway is 65000.
(Optional) The ASN for the Amazon side of the Specified when creating a virtual private gateway.
BGP session. If you do not specify a value, the default ASN
applies. For more information, see Virtual Private
Gateway.
(Optional) Tunnel information for each VPN You can configure some of the tunnel options for
tunnel the VPN connection. For more information, see
Site-to-Site VPN Tunnel Options for Your Site-to-
Site VPN Connection in the AWS Site-to-Site VPN
User Guide.
(Optional) Private certificate from AWS Certificate You must create a private certificate using
Manager Private Certificate Authority to AWS Certificate Manager Private Certificate
authenticate your VPN Authority. For information about creating a
private certificate, see Creating and Managing a
Private CA in the AWS Certificate Manager Private
Certificate Authority User Guide.
The configuration file for your customer gateway device includes the values that you specify for the
above items. It also contains any additional values required for setting up the VPN tunnels, including
the outside IP address for the virtual private gateway. This value is static unless you recreate the VPN
connection in AWS.
Routing Information
AWS recommends advertising more specific BGP routes to influence routing decisions in the virtual
private gateway. Check your vendor documentation for the commands that are specific to your device.
For more information about route priority, see Route Tables and VPN Route Priority in the AWS Site-to-
Site VPN User Guide.
If you have redundant customer gateway devices, each device advertises the same prefix (for example,
0.0.0.0/0) to the virtual private gateway. We use BGP routing to determine the path for traffic. If one
customer gateway device fails, the virtual private gateway directs all traffic to the working customer
gateway device.
5
Amazon Virtual Private Cloud Network Administrator Guide
Configuring Multiple VPN Connections to Your VPC
If you use the AWS VPN CloudHub configuration, multiple sites can access your VPC or securely access
each other using a simple hub-and-spoke model. You configure each customer gateway device to
advertise a site-specific prefix (such as 10.0.0.0/24, 10.0.1.0/24) to the virtual private gateway. The
virtual private gateway routes traffic to the appropriate site and advertises the reachability of one site to
all other sites.
To configure the AWS VPN CloudHub, use the Amazon VPC console to create multiple customer
gateways, each with the public IP address of the gateway. You must use a unique Border Gateway
Protocol (BGP) Autonomous System Number (ASN) for each. Then create a VPN connection from each
customer gateway to a common virtual private gateway. Use the instructions that follow to configure
each customer gateway device to connect to the virtual private gateway.
To enable instances in your VPC to reach the virtual private gateway (and then your customer gateway
devices), you must configure routes in your VPC routing tables. For complete instructions, see VPN
Connections in the AWS Site-to-Site VPN User Guide. For AWS VPN CloudHub, you can configure an
aggregate route in your VPC routing table (for example, 10.0.0.0/16). Use more specific prefixes between
customer gateways devices and the virtual private gateway.
When you create multiple VPN connections, the virtual private gateway sends network traffic to the
appropriate VPN connection using statically assigned routes or BGP route advertisements. Which one
depends on how the VPN connection was configured. Statically assigned routes are preferred over BGP
advertised routes in cases where identical routes exist in the virtual private gateway. If you select the
option to use BGP advertisement, then you cannot specify static routes.
When you have customer gateway devices at multiple geographic locations, each device should advertise
a unique set of IP ranges specific to the location. When you establish redundant customer gateway
devices at a single location, both devices should advertise the same IP ranges.
When a virtual private gateway receives routing information, it uses path selection to determine how to
route traffic. For more information, see Route Tables and VPN Route Priority in the AWS Site-to-Site VPN
User Guide.
6
Amazon Virtual Private Cloud Network Administrator Guide
Customer Gateway Devices We've Tested
This guide presents information about how to configure the following devices that we have tested with:
7
Amazon Virtual Private Cloud Network Administrator Guide
Requirements for Your Customer Gateway Device
• Zyxel Zywall Series 4.20 (or later) software for statically routed VPN connections, or 4.30 (or later)
software for dynamically routed VPN connections
If you have one of these devices, but configure it for IPsec in a different way than presented in this guide,
feel free to alter our suggested configuration to match your particular needs.
IKE Security Association (required to exchange keys used to establish the IPsec security
association)
IPsec Security Association (handles the tunnel's encryption, authentication, and so on.)
Optional BGP peering (exchanges routes between the customer gateway device and the virtual
private gateway) for devices that use BGP
If you have a device that isn't in the preceding list of tested devices, this section describes the
requirements the device must meet for you to use it with Amazon VPC. The following table lists the
requirement the customer gateway device must adhere to, the related RFC (for reference), and comments
about the requirement. For an example of the configuration information if your device isn't one of the
tested Cisco or Juniper devices, see Example: Generic Customer Gateway Device Using Border Gateway
Protocol (p. 160).
Each VPN connection consists of 2 separate tunnels. Each tunnel contains an IKE Security Association, an
IPsec Security Association, and a BGP Peering. You are limited to 1 unique Security Association (SA) pair
per tunnel (1 inbound and 1 outbound), and therefore 2 unique SA pairs in total for 2 tunnels (4 SAs).
Some devices use a policy-based VPN and create as many SAs as ACL entries. Therefore, you may need to
consolidate your rules and then filter so you don't permit unwanted traffic.
The VPN tunnel comes up when traffic is generated from your side of the VPN connection. The AWS
endpoint is not the initiator; your customer gateway device must initiate the tunnels.
Establish IKE Security RFC 2409 The IKE Security Association is established first between
Association using pre- the virtual private gateway and customer gateway device
shared keys RFC 7296 using the pre-shared key or a private certificate using
AWS Certificate Manager Private Certificate Authority as
the authenticator. Upon establishment, IKE negotiates
an ephemeral key to secure future IKE messages. Proper
establishment of an IKE Security Association requires
8
Amazon Virtual Private Cloud Network Administrator Guide
Requirements for Your Customer Gateway Device
Establish IPsec Security RFC 4301 Using the IKE ephemeral key, keys are established
Associations in Tunnel between the virtual private gateway and customer
mode gateway device to form an IPsec Security Association (SA).
Traffic between gateways is encrypted and decrypted
using this SA. The ephemeral keys used to encrypt traffic
within the IPsec SA are automatically rotated by IKE on a
regular basis to ensure confidentiality of communications.
Use the AES 128-bit RFC 3602 The encryption function is used to ensure privacy among
encryption or AES 256-bit both IKE and IPsec Security Associations.
encryption function
Use the SHA-1 or SHA-256 RFC 2404 This hashing function is used to authenticate both IKE
hashing function and IPsec Security Associations.
Use Diffie-Hellman Perfect RFC 2409 IKE uses Diffie-Hellman to establish ephemeral keys to
Forward Secrecy. The secure all communication between customer gateway
following groups are devices and virtual private gateways.
supported:
Use IPsec Dead Peer RFC 3706 The use of Dead Peer Detection enables the VPN devices
Detection to rapidly identify when a network condition prevents
delivery of packets across the internet. When this occurs,
the gateways delete the Security Associations and
attempt to create new associations. During this process,
the alternate IPsec tunnel is used if possible.
Bind tunnel to logical None Your gateway must support the ability to bind the
interface (route-based VPN) IPsec tunnel to a logical interface. The logical interface
contains an IP address used to establish BGP peering to
the virtual private gateway. This logical interface should
perform no additional encapsulation (for example, GRE,
IP in IP). Your interface should be set to a 1399 byte
Maximum Transmission Unit (MTU).
9
Amazon Virtual Private Cloud Network Administrator Guide
Requirements for Your Customer Gateway Device
Fragment IP packets before RFC 4459 When packets are too large to be transmitted, they
encryption must be fragmented. We do not reassemble fragmented
encrypted packets. Therefore, your VPN device must
fragment packets before encapsulating with the VPN
headers. The fragments are individually transmitted
to the remote host, which reassembles them. For
more information about fragmentation, see the IP
fragmentation Wikipedia article.
(Optional) Establish BGP RFC 4271 BGP is used to exchange routes between the customer
peerings gateway device and virtual private gateway for devices
that use BGP. All BGP traffic is encrypted and transmitted
via the IPsec Security Association. BGP is required for
both gateways to exchange the IP prefixes reachable
through the IPsec SA.
We recommend that you use the techniques listed in the following table. That helps you minimize
problems related to the amount of data that can be transmitted through the IPsec tunnel. Because the
connection encapsulates packets with additional network headers (including IPsec), the amount of data
that can be transmitted in a single packet is reduced.
Adjust the maximum RFC 4459 TCP packets are often the most prevalent type of packet
segment size of TCP across IPsec tunnels. Some gateways can change the TCP
packets entering the VPN Maximum Segment Size parameter. This causes the TCP
tunnel endpoints (clients, servers) to reduce the amount of data
sent with each packet. This is an ideal approach, as the
packets arriving at the VPN devices are small enough to
be encapsulated and transmitted.
Reset the "Don't Fragment" RFC 791 Some packets carry a flag, known as the Don't Fragment
flag on packets (DF) flag, that indicates that the packet should not be
fragmented. If the packets carry the flag, the gateways
generate an ICMP Path MTU Exceeded message. In some
cases, applications do not contain adequate mechanisms
for processing these ICMP messages and reducing the
amount of data transmitted in each packet. Some VPN
devices can override the DF flag and fragment packets
unconditionally as required. If your customer gateway
device has this ability, we recommend that you use it as
appropriate.
An AWS VPN connection does not support Path MTU Discovery (RFC 1191).
If you have a firewall between your customer gateway device and the internet, see Configuring a Firewall
Between the Internet and Your Customer Gateway Device (p. 11).
10
Amazon Virtual Private Cloud Network Administrator Guide
Configuring a Firewall Between the Internet
and Your Customer Gateway Device
Input Rule I1
Protocol UDP
Destination 500
Input Rule I2
Protocol UDP
Input Rule I3
Protocol IP 50 (ESP)
Input Rule I4
Protocol IP 50 (ESP)
Output Rule O1
11
Amazon Virtual Private Cloud Network Administrator Guide
Configuring a Firewall Between the Internet
and Your Customer Gateway Device
Protocol UDP
Output Rule O2
Protocol UDP
Output Rule O3
Protocol IP 50 (ESP)
Output Rule O4
Protocol IP 50 (ESP)
Rules I1, I2, O1, and O2 enable the transmission of IKE packets. Rules I3, I4, O3, and O4 enable the
transmission of IPsec packets containing the encrypted network traffic.
If you are using NAT traversal (NAT-T) on your device, then you must include rules that allow UDP access
over port 4500. Check if your device is advertising NAT-T.
12
Amazon Virtual Private Cloud Network Administrator Guide
High-Level View of the Customer Gateway
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• High-Level View of the Customer Gateway (p. 13)
• Configuration File (p. 14)
• Configuring the Check Point Device (p. 14)
• How to Test the Customer Gateway Configuration (p. 20)
13
Amazon Virtual Private Cloud Network Administrator Guide
Configuration File
Configuration File
Your integration team can provide you with a configuration file with the values you need in order to
configure each tunnel and the IKE and IPsec settings for your VPN device. The configuration file includes
instructions on how to use the Gaia web portal and Check Point SmartDashboard to configure your
device. The same steps are provided in the next section.
The following is an extract of an example configuration file. The file contains two sections: IPSec
Tunnel #1 and IPSec Tunnel #2. You must use the values provided in each section to configure each
tunnel.
! --------------------------------------------------------------------------------
! IPSec Tunnel #1
! --------------------------------------------------------------------------------
! #1: Tunnel Interface Configuration
...
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Tunnel Interface Configuration
...
Topics
• Step 1: Configure the Tunnel Interfaces (p. 15)
• Step 2: Configure BGP (p. 16)
• Step 3: Create Network Objects (p. 16)
• Step 4: Create a VPN Community and Configure IKE and IPsec (p. 17)
14
Amazon Virtual Private Cloud Network Administrator Guide
Step 1: Configure the Tunnel Interfaces
1. Connect to your security gateway over SSH. If you're using the non-default shell, change to clish by
running the following command: clish
2. Set the customer gateway ASN (the ASN that was provided when the customer gateway was created
in AWS) by running the following command:
set as 65000
3. Create the tunnel interface for the first tunnel, using the information provided under the IPSec
Tunnel #1 section of the configuration file. Provide a unique name for your tunnel, such as
AWS_VPC_Tunnel_1.
4. Repeat these commands to create the second tunnel, using the information provided under the
IPSec Tunnel #2 section of the configuration file. Provide a unique name for your tunnel, such as
AWS_VPC_Tunnel_2.
6. Configure the BGP for the first tunnel, using the information provided IPSec Tunnel #1 section of
the configuration file:
7. Configure the BGP for the second tunnel, using the information provided IPSec Tunnel #2
section of the configuration file:
15
Amazon Virtual Private Cloud Network Administrator Guide
Step 2: Configure BGP
save config
1. In the Gaia WebUI, choose Advanced Routing, Inbound Route Filters. Choose Add, and select Add
BGP Policy (Based on AS).
2. For Add BGP Policy, select a value between 512 and 1024 in the first field, and enter the virtual
private gateway ASN in the second field; for example, 7224.
3. Choose Save.
The following steps are for distributing local interface routes. You can also redistribute routes from
different sources; for example, static routes, or routes obtained through dynamic routing protocols. For
more information, go to the Gaia Advanced Routing R77 Versions Administration Guide.
1. In the Gaia WebUI, choose Advanced Routing, Routing Redistribution. Choose Add Redistribution
From and select Interface.
2. For To Protocol, select the virtual private gateway ASN; for example, 7224.
3. For Interface, select an internal interface. Choose Save.
16
Amazon Virtual Private Cloud Network Administrator Guide
Step 4: Create a VPN Community
and Configure IKE and IPsec
Note
If you're using clusters, then edit the topology and define the interfaces as cluster interfaces.
Use the IP addresses specified in the configuration file.
To create and configure the VPN community, IKE, and IPsec settings
1. From your gateway properties, choose IPSec VPN in the category pane.
2. Choose Communities, New, Star Community.
3. Provide a name for your community (for example, AWS_VPN_Star), and then choose Center
Gateways in the category pane.
4. Choose Add, and add your gateway or cluster to the list of participant gateways.
17
Amazon Virtual Private Cloud Network Administrator Guide
Step 4: Create a VPN Community
and Configure IKE and IPsec
5. In the category pane, choose Satellite Gateways, Add, and add the interoperable devices you
created earlier (AWS_VPC_Tunnel_1 and AWS_VPC_Tunnel_2) to the list of participant gateways.
6. In the category pane, choose Encryption. In the Encryption Method section, choose IKEv1 for IPv4
and IKEv2 for IPv6. In the Encryption Suite section, choose Custom, Custom Encryption.
Note
You must select the IKEv1 for IPv4 and IKEv2 for IPv6 option for IKEv1 functionality;
however, IKEv2 and IPv6 are currently not supported.
7. In the dialog box, configure the encryption properties as follows, and choose OK when you're done:
18
Amazon Virtual Private Cloud Network Administrator Guide
Step 5: Configure the Firewall
12. Still in the Advanced Settings category, choose Advanced VPN Properties, configure the properties
as follows, and choose OK when you're done:
1. In the SmartDashboard, choose Global Properties for your gateway. In the category pane, expand
VPN, and choose Advanced.
2. Choose Enable VPN Directional Match in VPN Column, and choose OK.
3. In the SmartDashboard, choose Firewall, and create a policy with the following rules:
• Allow the VPC subnet to communicate with the local network over the required protocols.
• Allow the local network to communicate with the VPC subnet over the required protocols.
4. Open the context menu for the cell in the VPN column, and choose Edit Cell.
5. In the VPN Match Conditions dialog box, choose Match traffic in this direction only. Create the
following directional match rules by choosing Add for each, and choose OK when you're done:
• internal_clear > VPN community (The VPN star community you created earlier, for example,
AWS_VPN_Star)
• VPN community > VPN community
• VPN community > internal_clear
6. In the SmartDashboard, choose Policy, Install.
7. In the dialog box, choose your gateway and choose OK to install the policy.
To configure DPD for a permanent tunnel, the permanent tunnel must be configured in the AWS VPN
community. For more information, see Step 8 in Step 4: Create a VPN Community and Configure IKE and
IPsec (p. 17)).
By default, the tunnel_keepalive_method property for a VPN gateway is set to tunnel_test. You
must change the value to dpd. Each VPN gateway in the VPN community that requires DPD monitoring
must be configured with the tunnel_keepalive_method property, including any 3rd party VPN
gateway. You cannot configure different monitoring mechanisms for the same gateway.
19
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
You can update the tunnel_keepalive_method property using the GuiDBedit tool.
1. Open the Check Point SmartDashboard, and choose Security Management Server, Domain
Management Server.
2. Choose File, Database Revision Control... and create a revision snapshot.
3. Close all SmartConsole windows, such as the SmartDashboard, SmartView Tracker, and SmartView
Monitor.
4. Start the GuiBDedit tool. For more information, see the Check Point Database Tool article on the
Check Point Support Center.
5. Choose Security Management Server, Domain Management Server.
6. In the upper left pane, choose Table, Network Objects, network_objects.
7. In the upper right pane, select the relevant Security Gateway, Cluster object.
8. Press CTRL+F, or use the Search menu to search for the following: tunnel_keepalive_method.
9. In the lower pane, open the context menu for tunnel_keepalive_method, and select Edit....
Choose dpd, OK.
10. Repeat steps 7–9 for each gateway that's part of the AWS VPN Community.
11. Choose File, Save All.
12. Close the GuiDBedit tool.
13. Open the Check Point SmartDashboard, and choose Security Management Server, Domain
Management Server.
14. Install the policy on the relevant Security Gateway, Cluster object.
For more information, see the New VPN features in R77.10 article on the Check Point Support Center.
TCP MSS clamping reduces the maximum segment size of TCP packets to prevent packet fragmentation.
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
20
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
On the Check Point gateway side, you can verify the tunnel status by running the following command
from the command line tool in expert mode:
vpn tunnelutil
In the options that display, choose 1 to verify the IKE associations and 2 to verify the IPsec associations.
21
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
You can also use the Check Point Smart Tracker Log to verify that packets over the connection are being
encrypted. For example, the following log indicates that a packet to the VPC was sent over tunnel 1 and
was encrypted.
22
Amazon Virtual Private Cloud Network Administrator Guide
High-Level View of the Customer Gateway
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• High-Level View of the Customer Gateway (p. 23)
• Configuration File (p. 24)
• Configuring the Check Point Device (p. 25)
• How to Test the Customer Gateway Configuration (p. 32)
23
Amazon Virtual Private Cloud Network Administrator Guide
Configuration File
Configuration File
Your integration team can provide you with a configuration file that has the values you need to
configure each tunnel and the IKE and IPsec settings for your VPN device. The configuration file includes
instructions on how to use the Gaia web portal and Check Point SmartDashboard to configure your
device. The same steps are provided in the next section.
The following is an extract of an example configuration file. The file contains two sections: IPSec
Tunnel #1 and IPSec Tunnel #2. You must use the values provided in each section to configure each
tunnel.
24
Amazon Virtual Private Cloud Network Administrator Guide
Configuring the Check Point Device
! --------------------------------------------------------------------------------
! IPSec Tunnel #1
! --------------------------------------------------------------------------------
! #1: Tunnel Interface Configuration
...
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Tunnel Interface Configuration
...
Topics
• Step 1: Configure Tunnel Interface (p. 25)
• Step 2: Configure the Static Route (p. 26)
• Step 3: Create Network Objects (p. 28)
• Step 4: Create a VPN Community and Configure IKE and IPsec (p. 29)
• Step 5: Configure the Firewall (p. 30)
• Step 6: Enable Dead Peer Detection and TCP MSS Clamping (p. 31)
1. Open the Gaia portal of your Check Point Security Gateway device.
2. Choose Network Interfaces, Add, VPN tunnel.
3. In the dialog box, configure the settings as follows, and choose OK when you are done:
25
Amazon Virtual Private Cloud Network Administrator Guide
Step 2: Configure the Static Route
• For Remote Address, enter the IP address specified for VGW Tunnel IP in the configuration file,
for example, 169.254.44.233.
4. Connect to your security gateway over SSH. If you're using the non-default shell, change to clish by
running the following command: clish
5. For tunnel 1, run the following command:
6. Repeat these steps to create a second tunnel, using the information under the IPSec Tunnel #2
section of the configuration file.
26
Amazon Virtual Private Cloud Network Administrator Guide
Step 2: Configure the Static Route
first tunnel. If an issue is detected, the policy-based static route is removed from the routing table, and
the second route is activated. You must also enable the Check Point gateway to ping the other end of the
tunnel to check if the tunnel is up.
7. Choose Save.
27
Amazon Virtual Private Cloud Network Administrator Guide
Step 3: Create Network Objects
If you're using a cluster, repeat the steps above for the other members of the cluster.
6. In the SmartDashboard, open your gateway properties and in the category pane, choose Topology.
7. To retrieve the interface configuration, choose Get Topology.
8. In the VPN Domain section, choose Manually defined, and browse to and select the empty simple
group that you created in step 2. Choose OK.
Note
You can keep any existing VPN domain that you've configured. However, ensure that the
hosts and networks that are used or served by the new VPN connection are not declared in
that VPN domain, especially if the VPN domain is automatically derived.
9. Repeat these steps to create a second network object, using the information under the IPSec
Tunnel #2 section of the configuration file.
Note
If you're using clusters, then edit the topology and define the interfaces as cluster interfaces.
Use the IP addresses specified in the configuration file.
28
Amazon Virtual Private Cloud Network Administrator Guide
Step 4: Create a VPN Community
and Configure IKE and IPsec
To create and configure the VPN community, IKE, and IPsec settings
1. From your gateway properties, choose IPSec VPN in the category pane.
2. Choose Communities, New, Star Community.
3. Provide a name for your community (for example, AWS_VPN_Star), and then choose Center
Gateways in the category pane.
4. Choose Add, and add your gateway or cluster to the list of participant gateways.
5. In the category pane, choose Satellite Gateways, Add, and add the interoperable devices you
created earlier (AWS_VPC_Tunnel_1 and AWS_VPC_Tunnel_2) to the list of participant gateways.
6. In the category pane, choose Encryption. In the Encryption Method section, choose IKEv1 only. In
the Encryption Suite section, choose Custom, Custom Encryption.
7. In the dialog box, configure the encryption properties as follows, and choose OK when you're done:
29
Amazon Virtual Private Cloud Network Administrator Guide
Step 5: Configure the Firewall
12. Still in the Advanced Settings category, choose Advanced VPN Properties, configure the properties
as follows, and choose OK when you're done:
1. In the SmartDashboard, choose Global Properties for your gateway. In the category pane, expand
VPN, and choose Advanced.
2. Choose Enable VPN Directional Match in VPN Column, and save your changes.
3. In the SmartDashboard, choose Firewall, and create a policy with the following rules:
30
Amazon Virtual Private Cloud Network Administrator Guide
Step 6: Enable Dead Peer Detection and TCP MSS Clamping
• Allow the VPC subnet to communicate with the local network over the required protocols.
• Allow the local network to communicate with the VPC subnet over the required protocols.
4. Open the context menu for the cell in the VPN column, and choose Edit Cell.
5. In the VPN Match Conditions dialog box, choose Match traffic in this direction only. Create the
following directional match rules by choosing Add for each, and choose OK when you're done:
• internal_clear > VPN community (The VPN star community you created earlier, for example,
AWS_VPN_Star)
• VPN community > VPN community
• VPN community > internal_clear
6. In the SmartDashboard, choose Policy, Install.
7. In the dialog box, choose your gateway and choose OK to install the policy.
To configure DPD for a permanent tunnel, the permanent tunnel must be configured in the AWS VPN
community (refer to Step 8 in Step 4: Create a VPN Community and Configure IKE and IPsec (p. 29)).
By default, the tunnel_keepalive_method property for a VPN gateway is set to tunnel_test. You
must change the value to dpd. Each VPN gateway in the VPN community that requires DPD monitoring
must be configured with the tunnel_keepalive_method property, including any 3rd party VPN
gateway. You cannot configure different monitoring mechanisms for the same gateway.
You can update the tunnel_keepalive_method property using the GuiDBedit tool.
1. Open the Check Point SmartDashboard, and choose Security Management Server, Domain
Management Server.
2. Choose File, Database Revision Control... and create a revision snapshot.
3. Close all SmartConsole windows, such as the SmartDashboard, SmartView Tracker, and SmartView
Monitor.
4. Start the GuiBDedit tool. For more information, see the Check Point Database Tool article on the
Check Point Support Center.
5. Choose Security Management Server, Domain Management Server.
6. In the upper left pane, choose Table, Network Objects, network_objects.
7. In the upper right pane, select the relevant Security Gateway, Cluster object.
8. Press CTRL+F, or use the Search menu to search for the following: tunnel_keepalive_method.
9. In the lower pane, open the context menu for tunnel_keepalive_method, and choose Edit....
Choose dpd and choose OK.
10. Repeat steps 7–9 for each gateway that's part of the AWS VPN Community.
11. Choose File, Save All.
12. Close the GuiDBedit tool.
13. Open the Check Point SmartDashboard, and choose Security Management Server, Domain
Management Server.
31
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
14. Install the policy on the relevant Security Gateway, Cluster object.
For more information, see the New VPN features in R77.10 article on the Check Point Support Center.
TCP MSS clamping reduces the maximum segment size of TCP packets to prevent packet fragmentation.
1. Ensure that the customer gateway device has a static route to your VPC, as suggested in the
configuration templates provided by AWS.
2. Ensure that a static route has been added to the VPN connection so that traffic can get back to your
customer gateway device. For example, if your local subnet prefix is 198.10.0.0/16, you need to
add a static route with that CIDR range to your VPN connection. Make sure that both tunnels have a
static route to your VPC.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the AWS Management Console. For
more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
32
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
On the Check Point gateway side, you can verify the tunnel status by running the following command
from the command line tool in expert mode:
vpn tunnelutil
In the options that display, choose 1 to verify the IKE associations and 2 to verify the IPsec associations.
You can also use the Check Point Smart Tracker Log to verify that packets over the connection are being
encrypted. For example, the following log indicates that a packet to the VPC was sent over tunnel 1 and
was encrypted.
33
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
34
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway
The diagram shows the high-level layout of the customer gateway. You should use the real configuration
information that you receive from your integration team and apply it to your customer gateway.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway (p. 35)
• An Example Configuration (p. 36)
• How to Test the Customer Gateway Configuration (p. 40)
35
Amazon Virtual Private Cloud Network Administrator Guide
An Example Configuration
Please note that some Cisco ASAs only support Active/Standby mode. When you use these Cisco ASAs,
you can have only one active tunnel at a time. The other standby tunnel becomes active if the first tunnel
becomes unavailable. With this redundancy, you should always have connectivity to your VPC through
one of the tunnels.
An Example Configuration
The configuration in this section is an example of the configuration information your integration team
should provide. The example configuration contains a set of information for each of the tunnels that you
must configure.
The example configuration includes example values to help you understand how configuration works.
For example, we provide example values for the VPN connection ID (vpn-12345678) and virtual
private gateway ID (vgw-12345678), and placeholders for the AWS endpoints (AWS_ENDPOINT_1
and AWS_ENDPOINT_2). Replace these example values with the actual values from the configuration
information that you receive.
Important
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
36
Amazon Virtual Private Cloud Network Administrator Guide
An Example Configuration
!
! --------------------------------------------------------------------------------
! IPSec Tunnels
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #201, which may conflict with
! an existing policy using the same or lower number depending on
! the encryption type. If so, we recommend changing the sequence number to
! avoid conflicts and overlap.
!
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
crypto isakmp identity address
crypto isakmp enable outside_interface
crypto isakmp policy 201
encryption aes
authentication pre-share
group 2
lifetime 28800
hash sha
exit
!
! The tunnel group sets the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
tunnel-group AWS_ENDPOINT_1 type ipsec-l2l
tunnel-group AWS_ENDPOINT_1 ipsec-attributes
pre-shared-key password_here
!
! This option enables IPSec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
isakmp keepalive threshold 10 retry 10
exit
!
tunnel-group AWS_ENDPOINT_2 type ipsec-l2l
tunnel-group AWS_ENDPOINT_2 ipsec-attributes
pre-shared-key password_here
!
! This option enables IPSec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
isakmp keepalive threshold 10 retry 10
exit
! --------------------------------------------------------------------------------
! #2: Access List Configuration
!
! Access lists are configured to permit creation of tunnels and to send applicable traffic
over them.
! This policy may need to be applied to an inbound ACL on the outside interface that is
used to manage control-plane traffic.
37
Amazon Virtual Private Cloud Network Administrator Guide
An Example Configuration
! This is to allow VPN traffic into the device from the Amazon endpoints.
!
access-list outside_access_in extended permit ip host AWS_ENDPOINT_1
host YOUR_UPLINK_ADDRESS
access-list outside_access_in extended permit ip host AWS_ENDPOINT_2
host YOUR_UPLINK_ADDRESS
!
! The following access list named acl-amzn specifies all traffic that needs to be routed to
the VPC. Traffic will
! be encrypted and transmitted through the tunnel to the VPC. Association with the IPSec
security association
! is done through the "crypto map" command.
!
! This access list should contain a static route corresponding to your VPC CIDR and allow
traffic from any subnet.
! If you do not wish to use the "any" source, you must use a single access-list entry for
accessing the VPC range.
! If you specify more than one entry for this ACL without using "any" as the source, the
VPN will function erratically.
! The any rule is also used so the security association will include the ASA outside
interface where the SLA monitor
! traffic will be sourced from.
! See section #4 regarding how to restrict the traffic going over the tunnel
!
!
access-list acl-amzn extended permit ip any vpc_subnet vpc_subnet_mask
!---------------------------------------------------------------------------------
! #3: IPSec Configuration
!
! The IPSec transform set defines the encryption, authentication, and IPSec
! mode parameters.
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
crypto ipsec ikev1 transform-set transform-amzn esp-aes esp-sha-hmac
! The crypto map references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime. The mapping is created
! as #1, which may conflict with an existing crypto map using the same
! number. If so, we recommend changing the mapping number to avoid conflicts.
!
crypto map amzn_vpn_map 1 match address acl-amzn
crypto map amzn_vpn_map 1 set pfs group2
crypto map amzn_vpn_map 1 set peer AWS_ENDPOINT_1 AWS_ENDPOINT_2
crypto map amzn_vpn_map 1 set transform-set transform-amzn
crypto map amzn_vpn_map 1 set security-association lifetime seconds 3600
!
! Only set this if you do not already have an outside crypto map, and it is not applied:
!
crypto map amzn_vpn_map interface outside_interface
!
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
!
! This option instructs the firewall to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
crypto ipsec df-bit clear-df outside_interface
!
! This configures the gateway's window for accepting out of order
! IPSec packets. A larger window can be helpful if too many packets
! are dropped due to reordering while in transit between gateways.
!
38
Amazon Virtual Private Cloud Network Administrator Guide
An Example Configuration
!---------------------------------------------------------------------------------
! #4: VPN Filter
! The VPN Filter will restrict traffic that is permitted through the tunnels. By default
all traffic is denied.
! The first entry provides an example to include traffic between your VPC Address space and
your office.
! You may need to run 'clear crypto isakmp sa', in order for the filter to take effect.
!
! access-list amzn-filter extended permit
ip vpc_subnet vpc_subnet_mask local_subnet local_subnet_mask
access-list amzn-filter extended deny ip any any
group-policy filter internal
group-policy filter attributes
vpn-filter value amzn-filter
tunnel-group AWS_ENDPOINT_1 general-attributes
default-group-policy filter
exit
tunnel-group AWS_ENDPOINT_2 general-attributes
default-group-policy filter
exit
!---------------------------------------------------------------------------------------
! #5: NAT Exemption
! If you are performing NAT on the ASA you will have to add a nat exemption rule.
! This varies depending on how NAT is set up. It should be configured along the lines of:
! object network obj-SrcNet
! subnet 0.0.0.0 0.0.0.0
! object network obj-amzn
! subnet vpc_subnet vpc_subnet_mask
! nat (inside,outside) 1 source static obj-SrcNet obj-SrcNet destination static obj-amzn
obj-amzn
39
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
! If using version 8.2 or older, the entry would need to look something like this:
! nat (inside) 0 access-list acl-amzn
! Or, the same rule in acl-amzn should be included in an existing no nat ACL.
• Ensure that a static route has been added to the VPN connection so that traffic can get back to your
customer gateway. For example, if your local subnet prefix is 198.10.0.0/16, add a static route
with that CIDR range to your VPN connection. Make sure that both tunnels have a static route to
your VPC.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the AWS Management Console. For
more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following.
ping 10.0.0.4
40
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing
ping messages from an internal IP address, not a tunnel IP address. Some AMIs don't
respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels do not test successfully, see Troubleshooting Cisco ASA Customer Gateway
Connectivity (p. 176).
41
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway (p. 42)
• Example Configuration (p. 43)
• How to Test the Customer Gateway Configuration (p. 49)
42
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
Cisco ASAs from version 9.7.1 and later support Active/Active mode. When you use these Cisco ASAs,
you can have both tunnels active at the same time. With this redundancy, you should always have
connectivity to your VPC through one of the tunnels.
Example Configuration
The configuration in this section is an example of the configuration information your integration team
should provide. The example configuration contains a set of information for each of the tunnels that you
must configure.
The example configuration includes example values to help you understand how configuration works.
For example, we provide example values for the VPN connection ID (vpn-12345678) and virtual
private gateway ID (vgw-12345678), and placeholders for the AWS endpoints (AWS_ENDPOINT_1
and AWS_ENDPOINT_2). Replace these example values with the actual values from the configuration
information that you receive.
Important
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
43
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
! -------------------------------------------------------------------------
! IPSec Tunnel #1
! -------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall !rules
to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #200, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
! -------------------------------------------------------------------------
! #2: IPSec Configuration
!
! The IPSec transform set defines the encryption, authentication, and IPSec
! mode parameters.
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
crypto ipsec ikev1 transform-set ipsec-prop-vpn-12345678-0 esp-aes esp-sha-hmac
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
44
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
!
crypto ipsec profile ipsec-vpn-12345678-0
set pfs group2
set security-association lifetime seconds 3600
set ikev1 transform-set ipsec-prop-vpn-12345678-0
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
! This option causes the firewall to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
! -------------------------------------------------------------------------
! The tunnel group sets the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
tunnel-group 13.54.43.86 type ipsec-l2l
tunnel-group 13.54.43.86 ipsec-attributes
ikev1 pre-shared-key pre-shared-key
!
! This option enables IPSec Dead Peer Detection, which causes semi-periodic
! messages to be sent to ensure a Security Association remains operational.
!
isakmp keepalive threshold 10 retry 10
exit
! -------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
45
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
interface Tunnel1
nameif Tunnel-int-vpn-12345678-0
ip address 169.254.33.198 255.255.255.252
tunnel source interface 'outside_interface'
tunnel destination 13.54.43.86
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-12345678-0
no shutdown
exit
! -------------------------------------------------------------------------
! -------------------------------------------------------------------------
! IPSec Tunnel #2
! -------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
46
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall !rules
to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #201, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
! -------------------------------------------------------------------------
! #2: IPSec Configuration
!
! The IPSec transform set defines the encryption, authentication, and IPSec
! mode parameters.
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
crypto ipsec ikev1 transform-set ipsec-prop-vpn-12345678-1 esp-aes esp-sha-hmac
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-12345678-1
set pfs group2
set security-association lifetime seconds 3600
set ikev1 transform-set ipsec-prop-vpn-12345678-1
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
! This option causes the firewall to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
47
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
!
crypto ipsec security-association replay window-size 128
! -------------------------------------------------------------------------
! The tunnel group sets the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
tunnel-group 52.65.137.78 type ipsec-l2l
tunnel-group 52.65.137.78 ipsec-attributes
ikev1 pre-shared-key pre-shared-key
!
! This option enables IPSec Dead Peer Detection, which causes semi-periodic
! messages to be sent to ensure a Security Association remains operational.
!
isakmp keepalive threshold 10 retry 10
exit
! -------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
interface Tunnel2
nameif Tunnel-int-vpn-12345678-1
ip address 169.254.33.194 255.255.255.252
tunnel source interface 'outside_interface'
tunnel destination 52.65.137.78
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-12345678-1
no shutdown
exit
! -------------------------------------------------------------------------
48
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
• Ensure that routes are advertised with BGP correctly and showing in routing table so that traffic can
get back to your customer gateway. For example, if your local subnet prefix is 198.10.0.0/16, you
must advertise it through BGP. Make sure that both tunnels are configured with BGP routing.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the AWS Management Console. For
more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
49
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing
ping messages from an internal IP address, not a tunnel IP address. Some AMIs don't
respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels do not test successfully, see Troubleshooting Cisco ASA Customer Gateway
Connectivity (p. 176).
50
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway (p. 51)
• Example Configuration (p. 52)
• How to Test the Customer Gateway Configuration (p. 57)
51
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
Cisco ASAs from version 9.7.1 and later support Active/Active mode. When you use these Cisco ASAs,
you can have both tunnels active at the same time. With this redundancy, you should always have
connectivity to your VPC through one of the tunnels.
Example Configuration
The configuration in this section is an example of the configuration information your integration team
should provide. The example configuration contains a set of information for each of the tunnels that you
must configure.
The example configuration includes example values to help you understand how configuration works.
For example, we provide example values for the VPN connection ID (vpn-12345678) and virtual
private gateway ID (vgw-12345678), and placeholders for the AWS endpoints (AWS_ENDPOINT_1
and AWS_ENDPOINT_2). Replace these example values with the actual values from the configuration
information that you receive.
52
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
• Configure all internal routing that moves traffic between the customer gateway and your local
network.
Important
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
! -------------------------------------------------------------------------
! IPSec Tunnel #1
! -------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall !rules
to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #200, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
! -------------------------------------------------------------------------
! #2: IPSec Configuration
!
! The IPSec transform set defines the encryption, authentication, and IPSec
! mode parameters.
53
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
crypto ipsec ikev1 transform-set ipsec-prop-vpn-12345678-0 esp-aes esp-sha-hmac
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-12345678-0
set pfs group2
set security-association lifetime seconds 3600
set ikev1 transform-set ipsec-prop-vpn-12345678-0
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
! This option causes the firewall to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
! -------------------------------------------------------------------------
! The tunnel group sets the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
tunnel-group 13.54.43.86 type ipsec-l2l
tunnel-group 13.54.43.86 ipsec-attributes
ikev1 pre-shared-key pre-shared-key
!
! This option enables IPSec Dead Peer Detection, which causes semi-periodic
! messages to be sent to ensure a Security Association remains operational.
!
isakmp keepalive threshold 10 retry 10
exit
54
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
! -------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
interface Tunnel1
nameif Tunnel-int-vpn-12345678-0
ip address 169.254.33.198 255.255.255.252
tunnel source interface 'outside_interface'
tunnel destination 13.54.43.86
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-12345678-0
no shutdown
exit
! -------------------------------------------------------------------------
! #4 Static Route Configuration
!
! Your Customer Gateway needs to set a static route for the prefix corresponding to your
! VPC to send traffic over the tunnel interface.
! An example for a VPC with the prefix 10.0.0.0/16 is provided below:
! route Tunnel-int-vpn-12345678-0 10.0.0.0 255.255.0.0 169.254.33.197 100
! -------------------------------------------------------------------------
! IPSec Tunnel #2
! -------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall !rules
to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #201, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
55
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
authentication pre-share
group 2
lifetime 28800
hash sha
! -------------------------------------------------------------------------
! #2: IPSec Configuration
!
! The IPSec transform set defines the encryption, authentication, and IPSec
! mode parameters.
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
crypto ipsec ikev1 transform-set ipsec-prop-vpn-12345678-1 esp-aes esp-sha-hmac
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-12345678-1
set pfs group2
set security-association lifetime seconds 3600
set ikev1 transform-set ipsec-prop-vpn-12345678-1
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
! This option causes the firewall to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
! -------------------------------------------------------------------------
! The tunnel group sets the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
56
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
! -------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
!You will need to replace the outside_interface with the interface name of your ASA
Firewall.
interface Tunnel2
nameif Tunnel-int-vpn-12345678-1
ip address 169.254.33.194 255.255.255.252
tunnel source interface 'outside_interface'
tunnel destination 52.65.137.78
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-12345678-1
no shutdown
exit
! -------------------------------------------------------------------------
! #4 Static Route Configuration
!
! Your Customer Gateway needs to set a static route for the prefix corresponding to your
! VPC to send traffic over the tunnel interface.
! An example for a VPC with the prefix 10.0.0.0/16 is provided below:
! route Tunnel-int-vpn-12345678-1 10.0.0.0 255.255.0.0 169.254.33.193 200
• Ensure that a static route has been added to the VPN connection so that traffic can get back to your
customer gateway. For example, if your local subnet prefix is 198.10.0.0/16, add a static route
with that CIDR range to your VPN connection. Make sure that both tunnels have a static route to
your VPC.
57
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the AWS Management Console. For
more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing
ping messages from an internal IP address, not a tunnel IP address. Some AMIs don't
respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels do not test successfully, see Troubleshooting Cisco ASA Customer Gateway
Connectivity (p. 176).
58
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway, and the second diagram shows details from the example configuration. You should
use the real configuration information that you receive from your integration team and apply it to your
customer gateway.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway (p. 60)
• A Detailed View of the Customer Gateway and an Example Configuration (p. 61)
• How to Test the Customer Gateway Configuration (p. 67)
59
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway
60
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
61
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
62
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #200, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
crypto isakmp policy 200
encryption aes 128
authentication pre-share
group 2
lifetime 28800
hash sha
exit
! The ISAKMP keyring stores the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
crypto keyring keyring-vpn-44a8938f-0
local-address YOUR_UPLINK_ADDRESS
pre-shared-key address 72.21.209.225 key plain-text-password1
exit
! The IPsec profile references the IPsec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-44a8938f-0
set pfs group2
set security-association lifetime seconds 3600
set transform-set ipsec-prop-vpn-44a8938f-0
exit
! Additional parameters of the IPsec configuration are set here. Note that
! these parameters are global and therefore impact other IPsec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
63
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! them to be fragmented.
!
crypto ipsec df-bit clear
! This option enables IPsec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
crypto isakmp keepalive 10 10 on-demand
64
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! -------------------------------------------------------------------------
! IPsec Tunnel #2
! -------------------------------------------------------------------------
! The ISAKMP keyring stores the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
crypto keyring keyring-vpn-44a8938f-1
local-address YOUR_UPLINK_ADDRESS
pre-shared-key address 72.21.209.193 key plain-text-password2
exit
65
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! endpoint.
!
crypto isakmp profile isakmp-vpn-44a8938f-1
local-address YOUR_UPLINK_ADDRESS
match identity address 72.21.209.193
keyring keyring-vpn-44a8938f-1
exit
! The IPsec profile references the IPsec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-44a8938f-1
set pfs group2
set security-association lifetime seconds 3600
set transform-set ipsec-prop-vpn-44a8938f-1
exit
! Additional parameters of the IPsec configuration are set here. Note that
! these parameters are global and therefore impact other IPsec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
crypto ipsec df-bit clear
! This option enables IPsec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
crypto isakmp keepalive 10 10 on-demand
66
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
!
! Association with the IPsec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
interface Tunnel2
ip address 169.254.255.6 255.255.255.252
ip virtual-reassembly
tunnel source YOUR_UPLINK_ADDRESS
tunnel destination 72.21.209.193
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-44a8938f-1
! This option causes the router to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
ip tcp adjust-mss 1387
no shutdown
exit
67
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
68
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
If your tunnels don't test successfully, see Troubleshooting Cisco IOS Customer Gateway
Connectivity (p. 179).
69
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway, and the second diagram shows details from the example configuration. You should
use the real configuration information that you receive from your integration team, and apply it to your
customer gateway.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway (p. 70)
• A Detailed View of the Customer Gateway and an Example Configuration (p. 71)
• How to Test the Customer Gateway Configuration (p. 77)
70
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
In addition, the example configuration refers to this item that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-1a2b3c4d), virtual
private gateway ID (vgw-12345678), the IP addresses (205.251.233.*, 169.254.255.*). Replace these
example values with the actual values from the configuration information that you receive.
71
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
! --------------------------------------------------------------------------------
! IPSec Tunnel #1
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
72
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! sequence number. This policy is defined as #200, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
crypto isakmp policy 200
encryption aes 128
authentication pre-share
group 2
lifetime 28800
hash sha
exit
! The ISAKMP keyring stores the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
crypto keyring keyring-vpn-1a2b3c4d-0
local-address CUSTOMER_IP
pre-shared-key address 205.251.233.121 key PASSWORD
exit
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-1a2b3c4d-0
set pfs group2
set security-association lifetime seconds 3600
set transform-set ipsec-prop-vpn-1a2b3c4d-0
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
! them to be fragmented.
!
crypto ipsec df-bit clear
! This option enables IPSec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
crypto isakmp keepalive 10 10 on-demand
73
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
interface Tunnel1
ip address 169.254.249.18 255.255.255.252
ip virtual-reassembly
tunnel source CUSTOMER_IP
tunnel destination 205.251.233.121
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-1a2b3c4d-0
! This option causes the router to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
ip tcp adjust-mss 1387
no shutdown
exit
! ----------------------------------------------------------------------------
! #4 Static Route Configuration
!
! Your Customer Gateway needs to set a static route for the prefix corresponding to your
! VPC to send traffic over the tunnel interface.
! An example for a VPC with the prefix 10.0.0.0/16 is provided below:
! ip route 10.0.0.0 255.255.0.0 Tunnel1 track 100
!
! SLA Monitor is used to provide a failover between the two tunnels. If the primary tunnel
fails, the redundant tunnel will automatically be used
! This sla is defined as #100, which may conflict with an existing sla using same number.
! If so, we recommend changing the sequence number to avoid conflicts.
!
ip sla 100
icmp-echo 169.254.249.17 source-interface Tunnel1
timeout 1000
frequency 5
exit
ip sla schedule 100 life forever start-time now
track 100 ip sla 100 reachability
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
74
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Note that there are a global list of ISAKMP policies, each identified by
! sequence number. This policy is defined as #201, which may conflict with
! an existing policy using the same number. If so, we recommend changing
! the sequence number to avoid conflicts.
!
crypto isakmp policy 201
encryption aes 128
authentication pre-share
group 2
lifetime 28800
hash sha
exit
! The ISAKMP keyring stores the Pre Shared Key used to authenticate the
! tunnel endpoints.
!
crypto keyring keyring-vpn-1a2b3c4d-1
local-address CUSTOMER_IP
pre-shared-key address 205.251.233.122 key PASSWORD
exit
! The IPSec profile references the IPSec transform set and further defines
! the Diffie-Hellman group and security association lifetime.
!
crypto ipsec profile ipsec-vpn-1a2b3c4d-1
set pfs group2
set security-association lifetime seconds 3600
set transform-set ipsec-prop-vpn-1a2b3c4d-1
exit
! Additional parameters of the IPSec configuration are set here. Note that
! these parameters are global and therefore impact other IPSec
! associations.
! This option instructs the router to clear the "Don't Fragment"
! bit from packets that carry this bit and yet must be fragmented, enabling
75
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer
Gateway and an Example Configuration
! them to be fragmented.
!
crypto ipsec df-bit clear
! This option enables IPSec Dead Peer Detection, which causes periodic
! messages to be sent to ensure a Security Association remains operational.
!
crypto isakmp keepalive 10 10 on-demand
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
interface Tunnel2
ip address 169.254.249.22 255.255.255.252
ip virtual-reassembly
tunnel source CUSTOMER_IP
tunnel destination 205.251.233.122
tunnel mode ipsec ipv4
tunnel protection ipsec profile ipsec-vpn-1a2b3c4d-1
! This option causes the router to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
ip tcp adjust-mss 1387
no shutdown
exit
! ----------------------------------------------------------------------------
! #4 Static Route Configuration
!
! Your Customer Gateway needs to set a static route for the prefix corresponding to your
! VPC to send traffic over the tunnel interface.
! An example for a VPC with the prefix 10.0.0.0/16 is provided below:
! ip route 10.0.0.0 255.255.0.0 Tunnel2 track 200
!
! SLA Monitor is used to provide a failover between the two tunnels. If the primary tunnel
fails, the redundant tunnel will automatically be used
! This sla is defined as #200, which may conflict with an existing sla using same number.
! If so, we recommend changing the sequence number to avoid conflicts.
!
ip sla 200
icmp-echo 169.254.249.21 source-interface Tunnel2
timeout 1000
frequency 5
76
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
exit
ip sla schedule 200 life forever start-time now
track 200 ip sla 200 reachability
! --------------------------------------------------------------------------------
1. Ensure that the customer gateway device has a static route to your VPC, as suggested in the
configuration templates provided by AWS.
2. Ensure that a static route has been added to the VPN connection so that traffic can get back to your
customer gateway device. For example, if your local subnet prefix is 198.10.0.0/16, you need to
add a static route with that CIDR range to your VPN connection. Make sure that both tunnels have a
static route to your VPC.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the AWS Management Console. For
more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
77
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels don't test successfully, see Troubleshooting Cisco IOS Customer Gateway without Border
Gateway Protocol Connectivity (p. 183).
78
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 79)
• Example Configuration File (p. 80)
• Configuring the SonicWALL Device Using the Management Interface (p. 83)
• How to Test the Customer Gateway Configuration (p. 83)
79
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
80
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
81
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
end
write
exit
commit
end
!
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
82
Amazon Virtual Private Cloud Network Administrator Guide
Configuring the SonicWALL Device
Using the Management Interface
You cannot configure BGP for the device using the management interface. Instead, use the command
line instructions provided in the example configuration file above, under the section named BGP.
83
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
84
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
If your tunnels don't test successfully, see Troubleshooting Generic Device Customer Gateway
Connectivity Using Border Gateway Protocol (p. 197).
85
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 86)
• Example Configuration File (p. 87)
• Configuring the SonicWALL Device Using the Management Interface (p. 90)
• How to Test the Customer Gateway Configuration (p. 92)
86
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
87
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
! IPSec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
! recommend configuring DPD on your endpoint as follows:
! - DPD Interval : 120
! - DPD Retries : 3
! To configure Dead Peer Detection for the SonicWall device, use the SonicOS management
interface.
!
88
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration File
89
Amazon Virtual Private Cloud Network Administrator Guide
Configuring the SonicWALL Device
Using the Management Interface
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
!
config
proposal ipsec lifetime 3600
proposal ipsec authentication sha1
proposal ipsec encryption aes128
proposal ipsec perfect-forward-secrecy dh-group 2
proposal ipsec protocol ESP
keep-alive
enable
commit
end
!
! You can use other supported IPSec parameters for encryption such as AES256, and other DH
groups such as 1,2, 5, 14-18, 22, 23, and 24.
!
! IPSec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
! recommend configuring DPD on your endpoint as follows:
! - DPD Interval : 120
! - DPD Retries : 3
! To configure Dead Peer Detection for the SonicWall device, use the SonicOS management
interface.
!
90
Amazon Virtual Private Cloud Network Administrator Guide
Configuring the SonicWALL Device
Using the Management Interface
• Under Local Networks, choose Any address. We recommend this option to prevent connectivity
issues from your local network.
• Under Remote Networks, choose Choose a destination network from list. Create an address
object with the CIDR of your VPC in AWS.
5. On the Proposals tab, complete the following information.
Important
If you created your virtual private gateway before October 2015, you must specify Diffie-
Hellman group 2, AES-128, and SHA1 for both phases.
6. On the Advanced tab, complete the following information:
7. Choose OK. On the Settings page, the Enable check box for the tunnel should be selected by
default. A green dot indicates that the tunnel is up.
• On your customer gateway device, verify that you have added a static route to the VPC CIDR IP space
to use the tunnel interface.
Next, you must test the connectivity for each tunnel by launching an instance into your VPC and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection; your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs
are available in the Quick Start menu when you use the Launch Instances wizard in the AWS
Management Console. For more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console displays
the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following:
ping 10.0.0.4
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing ping
messages from an internal IP address, not a tunnel IP address. Some AMIs don't respond to ping
messages from tunnel IP addresses.
92
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
If your tunnels don't test successfully, see Troubleshooting Generic Device Customer Gateway
Connectivity Using Border Gateway Protocol (p. 197).
93
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows the details of the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 95)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 95)
• How to Test the Customer Gateway Configuration (p. 103)
94
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
95
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
96
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
97
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
! This option causes the router to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
!
set tcp-mss 1387
set remote-ip 169.254.255.1
set mtu 1427
set interface "wan1"
next
! --------------------------------------------------------------------------------
98
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! To advertise additional prefixes to Amazon VPC, add these prefixes to the 'network'
! statement and identify the prefix you wish to advertise. Make sure the prefix is present
! in the routing table of the device with a valid next-hop. If you want to advertise
! 192.168.0.0/16 to Amazon, this can be done using the following:
! --------------------------------------------------------------------------------
! #5 Firewall Policy Configuration
!
! Create a firewall policy permitting traffic from your local subnet to the VPC subnet and
vice versa
!
! This example policy permits all traffic from the local subnet to the VPC
! First, find the policies that exist
! Next, create a new firewall policy starting with the next available policy ID. If
policies 1, 2, 3, and 4 were shown, then in this example the policy created starts 5
99
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
!
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
! Configuration begins in root VDOM.
config vpn ipsec phase1-interface
edit vpn-44a8938f-1 ! Name must be shorter than 15 chars, best if shorter than 12
set interface "wan1"
100
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
! This option causes the router to reduce the Maximum Segment Size of
! TCP packets to prevent packet fragmentation.
!
set tcp-mss 1387
set remote-ip 169.254.255.5
set mtu 1427
set interface "wan1"
next
! --------------------------------------------------------------------------------
101
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! Virtual Private Gateway and your Customer Gateway. The Virtual Private Gateway
! will announce the prefix corresponding to your VPC.
!
!
!
! The local BGP Autonomous System Number (ASN) (YOUR_BGP_ASN)
! is configured as part of your Customer Gateway. If the ASN must
! be changed, the Customer Gateway and VPN Connection will need to be recreated with AWS.
!
! To advertise additional prefixes to Amazon VPC, add these prefixes to the 'network'
! statement and identify the prefix you wish to advertise. Make sure the prefix is present
! in the routing table of the device with a valid next-hop. If you want to advertise
! 192.168.0.0/16 to Amazon, this can be done using the following:
102
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
!
! --------------------------------------------------------------------------------
! #5 Firewall Policy Configuration
!
! Create a firewall policy permitting traffic from your local subnet to the VPC subnet and
vice versa
!
! This example policy permits all traffic from the local subnet to the VPC
! First, find the policies that exist
! Next, create a new firewall policy starting with the next available policy ID. If
policies 1, 2, 3, and 4 were shown, then in this example the policy created starts 5
! --------------------------------------------------------------------------------
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
103
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
104
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows details from the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 106)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 107)
• How to Test the Customer Gateway Configuration (p. 113)
105
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
106
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the items in red italics with values
that apply to your particular configuration.
107
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
108
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
# The address of the external interface for your customer gateway must be a static
address.
# To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
#
set security ike proposal ike-prop-vpn-44a8938f-1 authentication-method pre-shared-keys
set security ike proposal ike-prop-vpn-44a8938f-1 authentication-algorithm sha1
set security ike proposal ike-prop-vpn-44a8938f-1 encryption-algorithm aes-128-cbc
set security ike proposal ike-prop-vpn-44a8938f-1 lifetime-seconds 28800
set security ike proposal ike-prop-vpn-44a8938f-1 dh-group group2
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway
# configuration associates a local interface, remote IP address, and
# IKE policy.
#
# This example shows the outside of the tunnel as interface ge-0/0/0.0.
# This should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
# This address is configured with the setup for your Customer Gateway.
#
# If the address changes, the Customer Gateway and VPN Connection must
# be recreated.
set security ike gateway gw-vpn-44a8938f-1 ike-policy ike-pol-vpn-44a8938f-0
set security ike gateway gw-vpn-44a8938f-1 external-interface ge-0/0/0.0
set security ike gateway gw-vpn-44a8938f-1 address 72.21.209.225
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec
# proposal.
#
set security ipsec policy ipsec-pol-vpn-44a8938f-1 perfect-forward-secrecy keys group2
set security ipsec policy ipsec-pol-vpn-44a8938f-1 proposals ipsec-prop-vpn-44a8938f-0
109
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# A security association is defined here. The IPsec Policy and IKE gateways
# are associated with a tunnel interface (st0.1).
# The tunnel interface ID is assumed; if other tunnels are defined on
# your router, you will need to specify a unique interface name
# (for example, st0.10).
#
set security ipsec vpn vpn-44a8938f-1 bind-interface st0.1
set security ipsec vpn vpn-44a8938f-1 ike gateway gw-vpn-44a8938f-0
set security ipsec vpn vpn-44a8938f-1 ike ipsec-policy ipsec-pol-vpn-44a8938f-0
set security ipsec vpn vpn-44a8938f-1 df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
#
set security ike gateway gw-vpn-44a8938f-1 dead-peer-detection
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation.
#
set security flow tcp-mss ipsec-vpn mss 1387
110
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# Customer Gateway and VPN Connection will need to be recreated with AWS.
#
# We establish a basic route policy to export a default route to the
# Virtual Private Gateway.
#
set policy-options policy-statement EXPORT-DEFAULT term default from route-filter 0.0.0.0/0
exact
set policy-options policy-statement EXPORT-DEFAULT term default then accept
set policy-options policy-statement EXPORT-DEFAULT term reject then reject
# -------------------------------------------------------------------------
# IPsec Tunnel #2
# -------------------------------------------------------------------------
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway
# configuration associates a local interface, remote IP address, and
# IKE policy.
#
# This example shows the outside of the tunnel as interface ge-0/0/0.0.
# This should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
# This address is configured with the setup for your Customer Gateway.
#
# If the address changes, the Customer Gateway and VPN Connection must be recreated.
#
set security ike gateway gw-vpn-44a8938f-2 ike-policy ike-pol-vpn-44a8938f-1
set security ike gateway gw-vpn-44a8938f-2 external-interface ge-0/0/0.0
set security ike gateway gw-vpn-44a8938f-2 address 72.21.209.193
111
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec
# proposal.
#
set security ipsec policy ipsec-pol-vpn-44a8938f-2 perfect-forward-secrecy keys group2
set security ipsec policy ipsec-pol-vpn-44a8938f-2 proposals ipsec-prop-vpn-44a8938f-2
# A security association is defined here. The IPsec Policy and IKE gateways
# are associated with a tunnel interface (st0.2).
# The tunnel interface ID is assumed; if other tunnels are defined on
# your router, you will need to specify a unique interface name
# (for example, st0.20).
#
set security ipsec vpn vpn-44a8938f-2 bind-interface st0.2
set security ipsec vpn vpn-44a8938f-2 ike gateway gw-vpn-44a8938f-2
set security ipsec vpn vpn-44a8938f-2 ike ipsec-policy ipsec-pol-vpn-44a8938f-2
set security ipsec vpn vpn-44a8938f-2 df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
#
set security ike gateway gw-vpn-44a8938f-2 dead-peer-detection
112
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation.
#
set security flow tcp-mss ipsec-vpn mss 1387
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
113
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels don't test successfully, see Troubleshooting Juniper JunOS Customer Gateway
Connectivity (p. 188).
114
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows details from the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 116)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 117)
• How to Test the Customer Gateway Configuration (p. 123)
115
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
116
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
117
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
118
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
# The address of the external interface for your customer gateway must be a static
address.
# To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
#
set security ike proposal ike-prop-vpn-44a8938f-1 authentication-method pre-shared-keys
set security ike proposal ike-prop-vpn-44a8938f-1 authentication-algorithm sha1
set security ike proposal ike-prop-vpn-44a8938f-1 encryption-algorithm aes-128-cbc
set security ike proposal ike-prop-vpn-44a8938f-1 lifetime-seconds 28800
set security ike proposal ike-prop-vpn-44a8938f-1 dh-group group2
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway
# configuration associates a local interface, remote IP address, and
# IKE policy.
#
# This example shows the outside of the tunnel as interface ge-0/0/0.0.
# This should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
# This address is configured with the setup for your Customer Gateway.
#
# If the address changes, the Customer Gateway and VPN Connection must
# be recreated.
set security ike gateway gw-vpn-44a8938f-1 ike-policy ike-pol-vpn-44a8938f-1
set security ike gateway gw-vpn-44a8938f-1 external-interface ge-0/0/0.0
set security ike gateway gw-vpn-44a8938f-1 address 72.21.209.225
set security ike gateway gw-vpn-44a8938f-1 no-nat-traversal
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec
# proposal.
#
set security ipsec policy ipsec-pol-vpn-44a8938f-1 perfect-forward-secrecy keys group2
set security ipsec policy ipsec-pol-vpn-44a8938f-1 proposals ipsec-prop-vpn-44a8938f-1
119
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# A security association is defined here. The IPsec Policy and IKE gateways
# are associated with a tunnel interface (st0.1).
# The tunnel interface ID is assumed; if other tunnels are defined on
# your router, you will need to specify a unique interface name
# (for example, st0.10).
#
set security ipsec vpn vpn-44a8938f-1 bind-interface st0.1
set security ipsec vpn vpn-44a8938f-1 ike gateway gw-vpn-44a8938f-1
set security ipsec vpn vpn-44a8938f-1 ike ipsec-policy ipsec-pol-vpn-44a8938f-1
set security ipsec vpn vpn-44a8938f-1 df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
#
set security ike gateway gw-vpn-44a8938f-1 dead-peer-detection
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation.
#
set security flow tcp-mss ipsec-vpn mss 1387
120
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# -------------------------------------------------------------------------
# IPsec Tunnel #2
# -------------------------------------------------------------------------
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway
# configuration associates a local interface, remote IP address, and
# IKE policy.
#
# This example shows the outside of the tunnel as interface ge-0/0/0.0.
# This should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
# This address is configured with the setup for your Customer Gateway.
#
# If the address changes, the Customer Gateway and VPN Connection must be recreated.
#
set security ike gateway gw-vpn-44a8938f-2 ike-policy ike-pol-vpn-44a8938f-2
set security ike gateway gw-vpn-44a8938f-2 external-interface ge-0/0/0.0
set security ike gateway gw-vpn-44a8938f-2 address 72.21.209.193
121
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# The IPsec policy incorporates the Diffie-Hellman group and the IPsec
# proposal.
#
set security ipsec policy ipsec-pol-vpn-44a8938f-2 perfect-forward-secrecy keys group2
set security ipsec policy ipsec-pol-vpn-44a8938f-2 proposals ipsec-prop-vpn-44a8938f-2
# A security association is defined here. The IPsec Policy and IKE gateways
# are associated with a tunnel interface (st0.2).
# The tunnel interface ID is assumed; if other tunnels are defined on
# your router, you will need to specify a unique interface name
# (for example, st0.20).
#
set security ipsec vpn vpn-44a8938f-2 bind-interface st0.2
set security ipsec vpn vpn-44a8938f-2 ike gateway gw-vpn-44a8938f-2
set security ipsec vpn vpn-44a8938f-2 ike ipsec-policy ipsec-pol-vpn-44a8938f-2
set security ipsec vpn vpn-44a8938f-2 df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
#
set security ike gateway gw-vpn-44a8938f-2 dead-peer-detection
122
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation.
#
set security flow tcp-mss ipsec-vpn mss 1387
1. On your customer gateway device, determine whether the BGP status is Established.
123
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels don't test successfully, see Troubleshooting Juniper JunOS Customer Gateway
Connectivity (p. 188).
124
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows details from the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 126)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 127)
• How to Test the Customer Gateway Configuration (p. 132)
125
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
126
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
127
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
Important
The configuration below is appropriate for ScreenOS versions 6.2 and later. You can download
a configuration that is specific to ScreenOS version 6.1. In the Download Configuration
dialog box, select Juniper Networks, Inc. from the Vendor list, SSG and ISG Series
Routers from the Platform list, and ScreenOS 6.1 from the Software list.
128
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway configuration
# associates a local interface, remote IP address, and IKE policy.
#
# This example shows the outside of the tunnel as interface ethernet0/0. This
# should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
# This address is configured with the setup for your Customer Gateway.
#
#If the address changes, the Customer Gateway and VPN Connection must be recreated.
#
set ike p2-proposal ipsec-prop-vpn-44a8938f-1 group2 esp aes128 sha-1 second 3600
set ike gateway gw-vpn-44a8938f-1 dpd-liveness interval 10
set vpn IPSEC-vpn-44a8938f-1 gateway gw-vpn-44a8938f-1 replay tunnel proposal ipsec-prop-
vpn-44a8938f-1
129
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# To establish connectivity between your internal network and the VPC, you
# must have an interface facing your internal network in the "Trust" zone.
#
# By default, the router will block asymmetric VPN traffic, which may occur
# with this VPN Connection. This occurs, for example, when routing policies
# cause traffic to sent from your router to VPC through one IPsec tunnel
# while traffic returns from VPC through the other.
#
# This command allows this traffic to be received by your device.
# This option causes the router to reduce the Maximum Segment Size of TCP
# packets to prevent packet fragmentation.
#
set enable
set neighbor 169.254.255.1 remote-as 7224
set neighbor 169.254.255.1 enable
exit
exit
set interface tunnel.1 protocol bgp
# -------------------------------------------------------------------------
# IPsec Tunnel #2
# -------------------------------------------------------------------------
130
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
set ike p1-proposal ike-prop-vpn-44a8938f-2 preshare group2 esp aes128 sha-1 second 28800
# The IKE gateway is defined to be the Virtual Private Gateway. The gateway configuration
# associates a local interface, remote IP address, and IKE policy.
#
# This example shows the outside of the tunnel as interface ethernet0/0. This
# should be set to the interface that IP address YOUR_UPLINK_ADDRESS is
# associated with.
#
# This address is configured with the setup for your Customer Gateway. If the
# address changes, the Customer Gateway and VPN Connection must be recreated.
#
set ike gateway gw-vpn-44a8938f-2 address 72.21.209.193 id 72.21.209.193 main outgoing-
interface ethernet0/0 preshare "plain-text-password2" proposal ike-prop-vpn-44a8938f-2
set ike p2-proposal ipsec-prop-vpn-44a8938f-2 group2 esp aes128 sha-1 second 3600
set ike gateway gw-vpn-44a8938f-2 dpd-liveness interval 10
set vpn IPSEC-vpn-44a8938f-2 gateway gw-vpn-44a8938f-2 replay tunnel proposal ipsec-prop-
vpn-44a8938f-2
131
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
# must have an interface facing your internal network in the "Trust" zone.
# By default, the router will block asymmetric VPN traffic, which may occur
# with this VPN Connection. This occurs, for example, when routing policies
# cause traffic to sent from your router to VPC through one IPsec tunnel
# while traffic returns from VPC through the other.
#
# This command allows this traffic to be received by your device.
# This option causes the router to reduce the Maximum Segment Size of TCP
# packets to prevent packet fragmentation.
1. On your customer gateway device, determine whether the BGP status is Established.
132
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
133
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
If your tunnels don't test successfully, see Troubleshooting Juniper ScreenOS Customer Gateway
Connectivity (p. 191).
134
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 135)
• Example Configuration (p. 136)
• How to Test the Customer Gateway Configuration (p. 139)
You should use the real configuration information that you receive from your integration team and apply
it to your customer gateway device.
135
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
Example Configuration
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-12345678), virtual
private gateway ID (vgw-12345678), and placeholders for the AWS endpoints (AWS_ENDPOINT_1 and
AWS_ENDPOINT_2).
In the following example configuration, you must replace the placeholder values are indicated by colored
italic text with values that apply to your particular configuration.
Important
The following configuration information is an example of what you can expect an integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
136
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
General information
a. Disabled : uncheck
b. Key Exchange version :V1
c. Internet Protocol : IPv4
d. Interface : WAN
e. Remote Gateway: AWS_ENPOINT_1
f. Description: Amazon-IKE-vpn-12345678-0
Advanced Options
a. Disable Rekey : uncheck
b. Responder Only : uncheck
c. NAT Traversal : Auto
d. Deed Peer Detection : Enable DPD
Delay between requesting peer acknowledgement : 10 seconds
Number of consecutive failures allowed before disconnect : 3 retries
137
Amazon Virtual Private Cloud Network Administrator Guide
Example Configuration
! Please note, you may use these additionally supported IPSec parameters for encryption
like AES256 and other DH groups like 2, 5, 14-18, 22, 23, and 24.
Expand the VPN configuration clicking in "+" and then create a new Phase2 entry as follows:
a. Disabled :uncheck
b. Mode : Tunnel
c. Local Network : Type: LAN subnet
Address : ! Enter your local network CIDR in the Address tab
d. Remote Network : Type : Network
Address : ! Enter your remote network CIDR in the Address tab
e. Description : Amazon-IPSec-vpn-12345678-0
Advanced Options
Automatically ping host : ! Provide the IP address of an EC2 instance in VPC that will
respond to ICMP.
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption, authentication, Diffie-
Hellman, lifetime,
! and key parameters.The IKE peer is configured with the supported IKE encryption,
authentication, Diffie-Hellman, lifetime, and key
! parameters.Please note, these sample configurations are for the minimum requirement of
AES128, SHA1, and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH
! groups like 2, 14-18, 22, 23, and 24. The address of the external interface for your
customer gateway must be a static address.
! Your customer gateway may reside behind a device performing network address translation
(NAT). To
! ensure that NAT traversal (NAT-T) can function, you must adjust your firewall
! rules to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
!
Go to VPN-->IPSec. Add a new Phase1 entry (click + button )
General information
a. Disabled : uncheck
b. Key Exchange version :V1
c. Internet Protocol : IPv4
d. Interface : WAN
e. Remote Gateway: AWS_ENPOINT_2
f. Description: Amazon-IKE-vpn-12345678-1
138
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Advanced Options
a. Disable Rekey : uncheck
b. Responder Only : uncheck
c. NAT Traversal : Auto
d. Deed Peer Detection : Enable DPD
Delay between requesting peer acknowledgement : 10 seconds
Number of consecutive failures allowed before disconnect : 3 retries
Expand the VPN configuration clicking in "+" and then create a new Phase2 entry as follows:
a. Disabled :uncheck
b. Mode : Tunnel
c. Local Network : Type: LAN subnet
Address : ! Enter your local network CIDR in the Address tab
d. Remote Network : Type : Network
Address : ! Enter your remote network CIDR in the Address tab
e. Description : Amazon-IPSec-vpn-12345678-1
Advanced Options
Automatically ping host : ! Provide the IP address of an EC2 instance in VPC that will
respond to ICMP.
• In the Amazon VPC console, ensure that a static route has been added to the VPN connection
so that traffic can get back to your customer gateway. For example, if your local subnet prefix is
198.10.0.0/16, you must add a static route with that CIDR range to your VPN connection. Make sure
that both tunnels have a static route to your VPC.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
139
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance from one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
available in the Quick Start menu when you use the Launch Instances Wizard in the Amazon EC2
console. For more information, see Launching an Instancein the Amazon EC2 User Guide for Linux
Instances.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console displays
the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing
ping messages from an internal IP address, not a tunnel IP address. Some AMIs don't
respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
140
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows the details of the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 142)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 142)
• How to Test the Customer Gateway Configuration (p. 149)
141
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
142
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
143
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
configure
edit network ike crypto-profiles ike-crypto-profiles ike-crypto-vpn-44a8938f-0
set dh-group group2
set hash sha1
set lifetime seconds 28800
set encryption aes128
top
144
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
top
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
! --------------------------------------------------------------------------------
145
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! To advertise additional prefixes to Amazon VPC, add these prefixes to the 'address-
prefix'
! statement and identify the prefix you wish to advertise. Make sure the prefix is present
! in the routing table of the device with a valid next-hop. If you want to advertise
! 192.168.0.0/16 to Amazon, this can be done using the following.
! --------------------------------------------------------------------------------
! IPSec Tunnel #2
! --------------------------------------------------------------------------------
! #1: Internet Key Exchange (IKE) Configuration
!
! A policy is established for the supported ISAKMP encryption,
! authentication, Diffie-Hellman, lifetime, and key parameters.
! Please note, these sample configurations are for the minimum requirement of AES128, SHA1,
and DH Group 2.
! You will need to modify these sample configuration files to take advantage of AES256,
SHA256, or other DH groups like 2, 14-18, 22, 23, and 24.
! The address of the external interface for your customer gateway must be a static
address.
! Your customer gateway may reside behind a device performing network address translation
(NAT).
! To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall !rules
to unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
!
configure
edit network ike crypto-profiles ike-crypto-profiles ike-crypto-vpn-44a8938f-1
set dh-group group2
set hash sha1
set lifetime seconds 28800
146
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! --------------------------------------------------------------------------------
! #3: Tunnel Interface Configuration
!
! A tunnel interface is configured to be the logical interface associated
! with the tunnel. All traffic routed to the tunnel interface will be
! encrypted and transmitted to the VPC. Similarly, traffic from the VPC
! will be logically received on this interface.
!
! Association with the IPSec security association is done through the
! "tunnel protection" command.
!
! The address of the interface is configured with the setup for your
! Customer Gateway. If the address changes, the Customer Gateway and VPN
! Connection must be recreated with Amazon VPC.
!
147
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
! To advertise additional prefixes to Amazon VPC, add these prefixes to the 'address-
prefix'
! statement and identify the prefix you wish to advertise. Make sure the prefix is present
! in the routing table of the device with a valid next-hop. If you want to advertise
! 192.168.0.0/16 to Amazon, this can be done using the following.
148
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
149
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
150
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows the details of the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
151
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 152)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 152)
• How to Test the Customer Gateway Configuration (p. 158)
152
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
should provide. The example configuration contains a set of information for each of the tunnels that you
must configure.
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
Warning
The following configuration information is an example of what you can expect your integration
team to provide. Many of the values in the following example are different from the actual
153
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
configuration information that you receive. You must use the actual values and not the example
values shown here. Otherwise, your implementation will fail.
# This line stores the Pre Shared Key used to authenticate the
# tunnel endpoints.
#
ipsec ike pre-shared-key 1 text plain-text-password1
154
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# Note that there are a global list of IPSec policies, each identified by
# sequence number. This policy is defined as #201, which may conflict with
# an existing policy using the same number. If so, we recommend changing
# the sequence number to avoid conflicts.
#
# The IPsec profile references the IPsec policy and further defines
# the Diffie-Hellman group and security association lifetime.
# Additional parameters of the IPsec configuration are set here. Note that
# these parameters are global and therefore impact other IPsec
# associations.
# This option instructs the router to clear the "Don't Fragment"
# bit from packets that carry this bit and yet must be fragmented, enabling
# them to be fragmented.
#
ipsec tunnel outer df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
# --------------------------------------------------------------------------------
# #3: Tunnel Interface Configuration
#
# A tunnel interface is configured to be the logical interface associated
# with the tunnel. All traffic routed to the tunnel interface will be
# encrypted and transmitted to the VPC. Similarly, traffic from the VPC
# will be logically received on this interface.
#
#
# The address of the interface is configured with the setup for your
# Customer Gateway. If the address changes, the Customer Gateway and VPN
# Connection must be recreated with Amazon VPC.
#
ipsec ike local address 1 YOUR_LOCAL_NETWORK_ADDRESS
ipsec ike remote address 1 72.21.209.225
ip tunnel address 169.254.255.2/30
ip tunnel remote address 169.254.255.1
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation
# --------------------------------------------------------------------------------
# #4: Border Gateway Protocol (BGP) Configuration
155
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
#
# BGP is used within the tunnel to exchange prefixes between the
# Virtual Private Gateway and your Customer Gateway. The Virtual Private Gateway
# will announce the prefix corresponding to your VPC.
#
# Your Customer Gateway may announce a default route (0.0.0.0/0),
# which can be done with the 'network' and 'default-originate' statements.
#
# The BGP timers are adjusted to provide more rapid detection of outages.
#
# The local BGP Autonomous System Number (ASN) (YOUR_BGP_ASN) is configured
# as part of your Customer Gateway. If the ASN must be changed, the
# Customer Gateway and VPN Connection will need to be recreated with AWS.
#
bgp use on
bgp autonomous-system YOUR_BGP_ASN
bgp neighbor 1 7224 169.254.255.1 hold-time=30 local-address=169.254.255.2
# To advertise additional prefixes to Amazon VPC, copy the 'network' statement and
# identify the prefix you wish to advertise. Make sure the
# prefix is present in the routing table of the device with a valid next-hop.
# For example, the following two lines will advertise 192.168.0.0/16 and 10.0.0.0/16 to
Amazon VPC
#
# bgp import filter 1 equal 10.0.0.0/16
# bgp import filter 1 equal 192.168.0.0/16
#
# --------------------------------------------------------------------------------
# IPsec Tunnel #2
# --------------------------------------------------------------------------------
# This line stores the Pre Shared Key used to authenticate the
# tunnel endpoints.
#
ipsec ike pre-shared-key 2 text plain-text-password2
156
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
# The IPsec profile references the IPsec policy and further defines
# the Diffie-Hellman group and security association lifetime.
# Additional parameters of the IPsec configuration are set here. Note that
# these parameters are global and therefore impact other IPsec
# associations.
# This option instructs the router to clear the "Don't Fragment"
# bit from packets that carry this bit and yet must be fragmented, enabling
# them to be fragmented.
#
ipsec tunnel outer df-bit clear
# This option enables IPsec Dead Peer Detection, which causes periodic
# messages to be sent to ensure a Security Association remains operational.
# --------------------------------------------------------------------------------
# #3: Tunnel Interface Configuration
#
# A tunnel interface is configured to be the logical interface associated
# with the tunnel. All traffic routed to the tunnel interface will be
# encrypted and transmitted to the VPC. Similarly, traffic from the VPC
# will be logically received on this interface.
#
# Association with the IPsec security association is done through the
# "tunnel protection" command.
#
# The address of the interface is configured with the setup for your
# Customer Gateway. If the address changes, the Customer Gateway and VPN
# Connection must be recreated with Amazon VPC.
#
ipsec ike local address 2 YOUR_LOCAL_NETWORK_ADDRESS
ipsec ike remote address 2 72.21.209.193
ip tunnel address 169.254.255.6/30
ip tunnel remote address 169.254.255.5
157
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
# This option causes the router to reduce the Maximum Segment Size of
# TCP packets to prevent packet fragmentation
# --------------------------------------------------------------------------------
# #4: Border Gateway Protocol (BGP) Configuration
#
# BGP is used within the tunnel to exchange prefixes between the
# Virtual Private Gateway and your Customer Gateway. The Virtual Private Gateway
# will announce the prefix corresponding to your VPC.
#
# Your Customer Gateway may announce a default route (0.0.0.0/0),
# which can be done with the 'network' and 'default-originate' statements.
#
#
# The BGP timers are adjusted to provide more rapid detection of outages.
#
# The local BGP Autonomous System Number (ASN) (YOUR_BGP_ASN) is configured
# as part of your Customer Gateway. If the ASN must be changed, the
# Customer Gateway and VPN Connection will need to be recreated with AWS.
#
bgp use on
bgp autonomous-system YOUR_BGP_ASN
bgp neighbor 2 7224 169.254.255.5 hold-time=30 local-address=169.254.255.6
# To advertise additional prefixes to Amazon VPC, copy the 'network' statement and
# identify the prefix you wish to advertise. Make sure the
# prefix is present in the routing table of the device with a valid next-hop.
# For example, the following two lines will advertise 192.168.0.0/16 and 10.0.0.0/16 to
Amazon VPC
#
# bgp import filter 1 equal 10.0.0.0/16
# bgp import filter 1 equal 192.168.0.0/16
#
1. On your customer gateway device, determine whether the BGP status is Established.
158
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels don't test successfully, see Troubleshooting Yamaha Customer Gateway
Connectivity (p. 194).
159
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows details from the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 161)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 161)
• How to Test the Customer Gateway Configuration (p. 166)
160
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
In addition, the example configuration refers to these items that you must provide:
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
161
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
private gateway ID (vgw-8db04f81), the IP addresses (72.21.209.*, 169.254.255.*), and the remote ASN
(7224). Replace these example values with the actual values from the configuration information that you
receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
IPsec Tunnel #1
================================================
162
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
The address of the external interface for your customer gateway must be a static address.
Your customer gateway may reside behind a device performing network address translation
(NAT).
To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall rules to
unblock UDP port 4500. If not behind NAT, we recommend disabling NAT-T.
- IKE version : IKEv1
- Authentication Method : Pre-Shared Key
- Pre-Shared Key : plain-text-password1
- Authentication Algorithm : sha1
- Encryption Algorithm : aes-128-cbc
- Lifetime : 28800 seconds
- Phase 1 Negotiation Mode : main
- Diffie-Hellman : Group 2
IPsec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
recommend configuring DPD on your endpoint as follows:
- DPD Interval : 10
- DPD Retries : 3
The Customer Gateway and Virtual Private Gateway each have two addresses that relate
to this IPsec tunnel. Each contains an outside address, upon which encrypted
traffic is exchanged. Each also contain an inside address associated with
the tunnel interface.
The Customer Gateway outside IP address was provided when the Customer Gateway
was created. Changing the IP address requires the creation of a new
Customer Gateway.
Outside IP Addresses:
163
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
Inside IP Addresses
- Customer Gateway : 169.254.255.2/30
- Virtual Private Gateway : 169.254.255.1/30
The Border Gateway Protocol (BGPv4) is used within the tunnel, between the inside
IP addresses, to exchange routes from the VPC to your home network. Each
BGP router has an Autonomous System Number (ASN). Your ASN was provided
to AWS when the Customer Gateway was created.
Configure BGP to announce routes to the Virtual Private Gateway. The gateway
will announce prefixes to your customer gateway based upon the prefix you
assigned to the VPC at creation time.
IPsec Tunnel #2
=====================================================
164
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
IPsec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
recommend configuring DPD on your endpoint as follows:
- DPD Interval : 10
- DPD Retries : 3
The Customer Gateway and Virtual Private Gateway each have two addresses that relate
to this IPsec tunnel. Each contains an outside address, upon which encrypted
traffic is exchanged. Each also contain an inside address associated with
the tunnel interface.
The Customer Gateway outside IP address was provided when the Customer Gateway
was created. Changing the IP address requires the creation of a new
Customer Gateway.
Outside IP Addresses:
- Customer Gateway: : YOUR_UPLINK_ADDRESS
- Virtual Private Gateway : 72.21.209.193
Inside IP Addresses
- Customer Gateway : 169.254.255.6/30
- Virtual Private Gateway : 169.254.255.5/30
"
#4: Border Gateway Protocol (BGP) Configuration:
The Border Gateway Protocol (BGPv4) is used within the tunnel, between the inside
IP addresses, to exchange routes from the VPC to your home network. Each
BGP router has an Autonomous System Number (ASN). Your ASN was provided
to AWS when the Customer Gateway was created.
165
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Configure BGP to announce routes to the Virtual Private Gateway. The gateway
will announce prefixes to your customer gateway based upon the prefix you
assigned to the VPC at creation time.
1. On your customer gateway device, determine whether the BGP status is Established.
When properly established, your BGP peering should be receiving one route from the virtual private
gateway corresponding to the prefix that your VPC integration team specified for the VPC (for example,
10.0.0.0/24). If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection: your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs are
listed in the launch wizard when you launch an instance from the Amazon EC2 console. For more
information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console
displays the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make
sure that the computer you ping from is behind the customer gateway device. A successful response
should be similar to the following.
ping 10.0.0.4
166
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
Note
If you ping an instance from your customer gateway device router, ensure that you are
sourcing ping messages from an internal IP address, not a tunnel IP address. Some AMIs
don't respond to ping messages from tunnel IP addresses.
4. (Optional) To test tunnel failover, you can temporarily disable one of the tunnels on your customer
gateway device, and repeat the above step. You cannot disable a tunnel on the AWS side of the VPN
connection.
If your tunnels don't test successfully, see Troubleshooting Generic Device Customer Gateway
Connectivity Using Border Gateway Protocol (p. 197).
167
Amazon Virtual Private Cloud Network Administrator Guide
Two diagrams illustrate the example configuration. The first diagram shows the high-level layout of the
customer gateway device, and the second diagram shows details from the example configuration. You
should use the real configuration information that you receive from your integration team and apply it to
your customer gateway device.
• You've created a Site-to-Site VPN connection in Amazon VPC. For more information, see Getting
Started in the AWS Site-to-Site VPN User Guide.
• You've read the requirements (p. 8) for your customer gateway device.
Topics
• A High-Level View of the Customer Gateway Device (p. 169)
• A Detailed View of the Customer Gateway Device and an Example Configuration (p. 169)
• How to Test the Customer Gateway Configuration (p. 174)
168
Amazon Virtual Private Cloud Network Administrator Guide
A High-Level View of the Customer Gateway Device
In addition, the example configuration refers to one item that you must provide:
169
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
translation (NAT). To ensure that NAT traversal (NAT-T) can function, you must adjust your firewall
rules to unblock UDP port 4500.
The example configuration includes several example values to help you understand how configuration
works. For example, we provide example values for the VPN connection ID (vpn-44a8938f), virtual
private gateway ID (vgw-8db04f81), and the VGW IP addresses (72.21.209.*, 169.254.255.*). Replace
these example values with the actual values from the configuration information that you receive.
In the following diagram and example configuration, you must replace the placeholder values are
indicated by colored italic text with values that apply to your particular configuration.
Important
The following configuration information is an example of what you can expect an integration
team to provide. Many of the values in the following example are different from the actual
configuration information that you receive. You must use the actual values and not the example
values shown here, or your implementation will fail.
IPSec Tunnel #1
170
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
================================================================================
IPSec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
recommend configuring DPD on your endpoint as follows:
- DPD Interval : 10
- DPD Retries : 3
The Customer Gateway and Virtual Private Gateway each have two addresses that relate
to this IPSec tunnel. Each contains an outside address, upon which encrypted
171
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
The Customer Gateway outside IP address was provided when the Customer Gateway
was created. Changing the IP address requires the creation of a new
Customer Gateway.
Outside IP Addresses:
- Customer Gateway : YOUR_UPLINK_ADDRESS
- Virtual Private Gateway : 72.21.209.193
Inside IP Addresses
- Customer Gateway : 169.254.255.74/30
- Virtual Private Gateway : 169.254.255.73/30
You should add static routes towards your internal network on the VGW.
The VGW will then send traffic towards your internal network over
the tunnels.
IPSec Tunnel #2
================================================================================
172
Amazon Virtual Private Cloud Network Administrator Guide
A Detailed View of the Customer Gateway
Device and an Example Configuration
IPSec Dead Peer Detection (DPD) will be enabled on the AWS Endpoint. We
recommend configuring DPD on your endpoint as follows:
- DPD Interval : 10
- DPD Retries : 3
The Customer Gateway and Virtual Private Gateway each have two addresses that relate
to this IPSec tunnel. Each contains an outside address, upon which encrypted
traffic is exchanged. Each also contain an inside address associated with
the tunnel interface.
The Customer Gateway outside IP address was provided when the Customer Gateway
was created. Changing the IP address requires the creation of a new
Customer Gateway.
Outside IP Addresses:
- Customer Gateway : YOUR_UPLINK_ADDRESS
- Virtual Private Gateway : 72.21.209.225
Inside IP Addresses
- Customer Gateway : 169.254.255.78/30
- Virtual Private Gateway : 169.254.255.77/30
173
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
You should add static routes towards your internal network on the VGW.
The VGW will then send traffic towards your internal network over
the tunnels.
• On your customer gateway device, verify that you have added a static route to the VPC CIDR IP space
to use the tunnel interface.
Next you must test the connectivity for each tunnel by launching an instance into your VPC, and pinging
the instance from your home network. Before you begin, make sure of the following:
• Use an AMI that responds to ping requests. We recommend that you use one of the Amazon Linux
AMIs.
• Configure your instance's security group and network ACL to enable inbound ICMP traffic.
• Ensure that you have configured routing for your VPN connection - your subnet's route table must
contain a route to the virtual private gateway. For more information, see Enable Route Propagation in
Your Route Table in the Amazon VPC User Guide.
1. Launch an instance of one of the Amazon Linux AMIs into your VPC. The Amazon Linux AMIs
are available in the Quick Start menu when you use the Launch Instances Wizard in the AWS
Management Console. For more information, see the Amazon VPC Getting Started Guide.
2. After the instance is running, get its private IP address (for example, 10.0.0.4). The console displays
the address as part of the instance's details.
3. On a system in your home network, use the ping command with the instance's IP address. Make sure
that the computer you ping from is behind the customer gateway. A successful response should be
similar to the following.
Note
If you ping an instance from your customer gateway router, ensure that you are sourcing ping
messages from an internal IP address, not a tunnel IP address. Some AMIs don't respond to ping
messages from tunnel IP addresses.
174
Amazon Virtual Private Cloud Network Administrator Guide
How to Test the Customer Gateway Configuration
If your tunnels don't test successfully, see Troubleshooting Generic Device Customer Gateway
Connectivity Using Border Gateway Protocol (p. 197).
175
Amazon Virtual Private Cloud Network Administrator Guide
Cisco ASA Customer Gateway Connectivity
Troubleshooting
If your tunnels aren't in the correct state when you test your customer gateway device, use the following
troubleshooting information.
Topics
• Troubleshooting Cisco ASA Customer Gateway Connectivity (p. 176)
• Troubleshooting Cisco IOS Customer Gateway Connectivity (p. 179)
• Troubleshooting Cisco IOS Customer Gateway without Border Gateway Protocol
Connectivity (p. 183)
• Troubleshooting Juniper JunOS Customer Gateway Connectivity (p. 188)
• Troubleshooting Juniper ScreenOS Customer Gateway Connectivity (p. 191)
• Troubleshooting Yamaha Customer Gateway Connectivity (p. 194)
• Troubleshooting Generic Device Customer Gateway Connectivity Using Border Gateway
Protocol (p. 197)
• Troubleshooting Generic Device Customer Gateway without Border Gateway Protocol
Connectivity (p. 200)
IKE
Use the following command. The response shows a customer gateway with IKE configured correctly.
Active SA: 2
Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)
Total IKE SA: 2
176
Amazon Virtual Private Cloud Network Administrator Guide
IPsec
You should see one or more lines containing an src value for the remote gateway specified in the
tunnels. The state value should be MM_ACTIVE and status should be ACTIVE. The absence of an
entry, or any entry in another state, indicates that IKE is not configured properly.
For further troubleshooting, run the following commands to enable log messages that provide
diagnostic information.
IPsec
Use the following command. The response shows a customer gateway with IPsec configured correctly.
interface: outside
Crypto map tag: VPN_crypto_map_name, seq num: 2, local addr: 172.25.50.101
177
Amazon Virtual Private Cloud Network Administrator Guide
Routing
For each tunnel interface, you should see both inbound esp sas and outbound esp sas. This
assumes that an SA is listed (for example, spi: 0x48B456A6), and IPsec is configured correctly.
In Cisco ASA, the IPsec only comes up after "interesting traffic" is sent. To always keep the IPsec active,
we recommend configuring SLA monitor. SLA monitor continues to send interesting traffic, keeping the
IPsec active.
You can also use the following ping command to force your IPsec to start negotiation and go up:
ping ec2_instance_ip_address
Routing
Ping the other end of the tunnel. If this is working, then your IPsec should be up and running fine. If this
is not working, check your access lists, and refer the previous IPsec section.
If you are not able to reach your instances, check the following:
1. Verify that the access-list is configured to allow traffic that is associated with the crypto map.
178
Amazon Virtual Private Cloud Network Administrator Guide
Cisco IOS Customer Gateway Connectivity
For example:
3. Verify that this access list is correct. The example access list in the previous step allows all internal
traffic to the VPC subnet 10.0.0.0/16.
4. Run a traceroute from the Cisco ASA device, to see if it reaches the Amazon routers (for example,
AWS_ENDPOINT_1/AWS_ENDPOINT_2).
If this reaches the Amazon router, then check the static routes that you added in the AWS
Management Console, and also the security groups for the particular instances.
5. For further troubleshooting, review the configuration.
IKE
Use the following command. The response shows a customer gateway with IKE configured correctly.
You should see one or more lines containing an src value for the Remote Gateway specified in the
tunnels. The state should be QM_IDLE and status should be ACTIVE. The absence of an entry, or any
entry in another indicate that IKE is not configured properly.
For further troubleshooting, run the following commands to enable log messages that provide
diagnostic information.
179
Amazon Virtual Private Cloud Network Administrator Guide
IPsec
IPsec
Use the following command. The response shows a customer gateway with IPsec configured correctly.
interface: Tunnel1
Crypto map tag: Tunnel1-head-0, local addr 192.168.37.160
inbound ah sas:
outbound ah sas:
interface: Tunnel2
Crypto map tag: Tunnel2-head-0, local addr 174.78.144.73
180
Amazon Virtual Private Cloud Network Administrator Guide
Tunnel
inbound ah sas:
outbound ah sas:
For each tunnel interface, you should see both inbound esp sas and outbound esp sas. Assuming
an SA is listed (spi: 0xF95D2F3C, for example) and the Status is ACTIVE, IPsec is configured
correctly.
Tunnel
First, check that you have the necessary firewall rules in place. For more information, see Configuring a
Firewall Between the Internet and Your Customer Gateway Device (p. 11).
If your firewall rules are set up correctly, then continue troubleshooting with the following command:
181
Amazon Virtual Private Cloud Network Administrator Guide
BGP
Make sure that the line protocol is up. Check that the tunnel source IP address, source interface and
destination respectively match the tunnel configuration for the customer gateway outside IP address,
interface, and virtual private gateway outside IP address. Make sure that Tunnel protection via
IPSec is present. Make sure to run the command on both tunnel interfaces. To resolve any problems
here, review the configuration and check the physical connections to your customer gateway.
Also use the following command, replacing 169.254.255.1 with the inside IP address of your virtual
private gateway.
BGP
Use the following command:
182
Amazon Virtual Private Cloud Network Administrator Guide
Virtual Private Gateway Attachment
Here, both neighbors should be listed. For each, you should see a State/PfxRcd value of 1.
If the BGP peering is up, verify that your customer gateway router is advertising the default route
(0.0.0.0/0) to the VPC.
Additionally, ensure that you're receiving the prefix corresponding to your VPC from the virtual private
gateway.
If you have questions or need further assistance, use the Amazon VPC forum.
IKE
Use the following command. The response shows a customer gateway with IKE configured correctly.
183
Amazon Virtual Private Cloud Network Administrator Guide
IPsec
You should see one or more lines containing an src value for the remote gateway specified in the
tunnels. The state should be QM_IDLE and status should be ACTIVE. The absence of an entry, or any
entry in another state, indicates that IKE is not configured properly.
For further troubleshooting, run the following commands to enable log messages that provide
diagnostic information.
IPsec
Use the following command. The response shows a customer gateway with IPsec configured correctly.
interface: Tunnel1
Crypto map tag: Tunnel1-head-0, local addr 174.78.144.73
inbound ah sas:
184
Amazon Virtual Private Cloud Network Administrator Guide
IPsec
spi: 0xB8357C22(3090512930)
transform: esp-aes esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2, flow_id: Motorola SEC 2.0:2, crypto map: Tunnel1-head-0
sa timing: remaining key lifetime (k/sec): (4467148/3189)
IV size: 16 bytes
replay detection support: Y replay window size: 128
Status: ACTIVE
outbound ah sas:
interface: Tunnel2
Crypto map tag: Tunnel2-head-0, local addr 205.251.233.122
inbound ah sas:
outbound ah sas:
For each tunnel interface, you should see both an inbound esp sas and outbound esp sas. This
assumes that an SA is listed (for example, spi: 0x48B456A6), the status is ACTIVE, and IPsec is
configured correctly.
185
Amazon Virtual Private Cloud Network Administrator Guide
Tunnel
Tunnel
First, check that you have the necessary firewall rules in place. For more information, see Configuring a
Firewall Between the Internet and Your Customer Gateway Device (p. 11).
If your firewall rules are set up correctly, then continue troubleshooting with the following command:
Make sure that the line protocol is up. Check that the tunnel source IP address, source interface, and
destination respectively match the tunnel configuration for the customer gateway outside IP address,
interface, and virtual private gateway outside IP address. Make sure that Tunnel protection
through IPSec is present. Make sure to run the command on both tunnel interfaces. To resolve any
problems, review the configuration and check the physical connections to your customer gateway.
You can also use the following command, replacing 169.254.249.18 with the inside IP address of your
virtual private gateway.
186
Amazon Virtual Private Cloud Network Administrator Guide
Virtual Private Gateway Attachment
Routing
To see your static route table, use the following command:
You should see that the static route for the VPC CIDR through both tunnels exists. If it does not exist, add
the static routes as shown here:
The value of "Number of successes" indicates whether the SLA monitor has been set up successfully.
If you have questions or need further assistance, please use the Amazon VPC forum.
187
Amazon Virtual Private Cloud Network Administrator Guide
Juniper JunOS Customer Gateway Connectivity
IKE
Use the following command. The response shows a customer gateway with IKE configured correctly.
You should see one or more lines containing a Remote Address of the Remote Gateway specified in the
tunnels. The State should be UP. The absence of an entry, or any entry in another state (such as DOWN) is
an indication that IKE is not configured properly.
For further troubleshooting, enable the IKE trace options (as recommended in the example configuration
information (see Example: Juniper J-Series JunOS Device (p. 105)). Then run the following command to
print a variety of debugging messages to the screen.
From an external host, you can retrieve the entire log file with the following command:
scp username@router.hostname:/var/log/kmd
IPsec
Use the following command. The response shows a customer gateway with IPsec configured correctly.
Specifically, you should see at least two lines per Gateway address (corresponding to the Remote
Gateway). Note the carets at the beginning of each line (< >) which indicate the direction of traffic for
the particular entry. The output has separate lines for inbound traffic ("<", traffic from the virtual private
gateway to this customer gateway) and outbound traffic (">").
For further troubleshooting, enable the IKE traceoptions (for more information, see the preceding
section about IKE).
188
Amazon Virtual Private Cloud Network Administrator Guide
Tunnel
Tunnel
First, double-check that you have the necessary firewall rules in place. For a list of the rules, see
Configuring a Firewall Between the Internet and Your Customer Gateway Device (p. 11).
If your firewall rules are set up correctly, then continue troubleshooting with the following command:
Make sure that the Security: Zone is correct, and that the Local address matches the customer
gateway tunnel inside address.
Next, use the following command, replacing 169.254.255.1 with the inside IP address of your virtual
private gateway. Your results should look like the response shown here.
BGP
Use the following command:
For further troubleshooting, use the following command, replacing 169.254.255.1 with the inside IP
address of your virtual private gateway.
189
Amazon Virtual Private Cloud Network Administrator Guide
BGP
Here you should see Received prefixes and Advertised prefixes listed at 1 each. This should be
within the Table inet.0 section.
If the State is not Established, check the Last State and Last Error for details of what is
required to correct the problem.
If the BGP peering is up, verify that your customer gateway router is advertising the default route
(0.0.0.0/0) to the VPC.
Additionally, make sure that you're receiving the prefix corresponding to your VPC from the virtual
private gateway.
190
Amazon Virtual Private Cloud Network Administrator Guide
Virtual Private Gateway Attachment
If you have questions or need further assistance, use the Amazon VPC forum.
ssg5-serial-> get sa
You should see one or more lines containing a Remote Address of the Remote Gateway specified in the
tunnels. The Sta value should be A/- and SPI should be a hexadecimal number other than 00000000.
Entries in other states indicate that IKE is not configured properly.
For further troubleshooting, enable the IKE trace options (as recommended in the example configuration
information (see Example: Juniper ScreenOS Device (p. 125)).
Tunnel
First, double-check that you have the necessary firewall rules in place. For a list of the rules, see
Configuring a Firewall Between the Internet and Your Customer Gateway Device (p. 11).
If your firewall rules are set up correctly, then continue troubleshooting with the following command:
Interface tunnel.1:
description tunnel.1
number 20, if_info 1768, if_index 1, mode route
link ready
vsys Root, zone Trust, vr trust-vr
admin mtu 1500, operating mtu 1500, default mtu 1500
191
Amazon Virtual Private Cloud Network Administrator Guide
BGP
*ip 169.254.255.2/30
*manage ip 169.254.255.2
route-deny disable
bound vpn:
IPSEC-1
pmtu-v4 disabled
ping disabled, telnet disabled, SSH disabled, SNMP disabled
web disabled, ident-reset disabled, SSL disabled
OSPF disabled BGP enabled RIP disabled RIPng disabled mtrace disabled
PIM: not configured IGMP not configured
NHRP disabled
bandwidth: physical 0kbps, configured egress [gbw 0kbps mbw 0kbps]
configured ingress mbw 0kbps, current bw 0kbps
total allocated gbw 0kbps
Make sure that you see link:ready, and that the IP address matches the customer gateway tunnel
inside address.
Next, use the following command, replacing 169.254.255.1 with the inside IP address of your virtual
private gateway. Your results should look like the response shown here.
BGP
Use the following command:
Both BGP peers should be listed as State: ESTABLISH, which means the BGP connection to the virtual
private gateway is active.
For further troubleshooting, use the following command, replacing 169.254.255.1 with the inside IP
address of your virtual private gateway.
192
Amazon Virtual Private Cloud Network Administrator Guide
Virtual Private Gateway Attachment
If the BGP peering is up, verify that your customer gateway router is advertising the default route
(0.0.0.0/0) to the VPC. This command applies to ScreenOS version 6.2.0 and higher.
Additionally, ensure that you're receiving the prefix corresponding to your VPC from the virtual private
gateway. This command applies to ScreenOS version 6.2.0 and higher.
If you have questions or need further assistance, please use the Amazon VPC forum.
193
Amazon Virtual Private Cloud Network Administrator Guide
Yamaha Customer Gateway Connectivity
IKE
Use the following command. The response shows a customer gateway with IKE configured correctly.
You should see a line containing a remote-id value for the Remote Gateway specified in the tunnels.
You can list all the security associations (SAs) by omitting the tunnel number.
For further troubleshooting, run the following commands to enable DEBUG level log messages that
provide diagnostic information.
# syslog debug on
# ipsec ike log message-info payload-info key-info
IPsec
Use the following command. The response shows a customer gateway with IPsec configured correctly.
SPI: 6b ce fd 8a d5 30 9b 02 0c f3 87 52 4a 87 6e 77
Key: ** ** ** ** ** (confidential) ** ** ** ** **
----------------------------------------------------
SA[2] Duration: 1719s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Direction: send
Protocol: ESP (Mode: tunnel)
Algorithm: AES-CBC (for Auth.: HMAC-SHA)
SPI: a6 67 47 47
194
Amazon Virtual Private Cloud Network Administrator Guide
Tunnel
Key: ** ** ** ** ** (confidential) ** ** ** ** **
----------------------------------------------------
SA[3] Duration: 1719s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Direction: receive
Protocol: ESP (Mode: tunnel)
Algorithm: AES-CBC (for Auth.: HMAC-SHA)
SPI: 6b 98 69 2b
Key: ** ** ** ** ** (confidential) ** ** ** ** **
----------------------------------------------------
SA[4] Duration: 10681s
Local ID: YOUR_LOCAL_NETWORK_ADDRESS
Remote ID: 72.21.209.225
Protocol: IKE
Algorithm: AES-CBC, SHA-1, MODP 1024bit
SPI: e8 45 55 38 90 45 3f 67 a8 74 ca 71 ba bb 75 ee
Key: ** ** ** ** ** (confidential) ** ** ** ** **
----------------------------------------------------
For each tunnel interface, you should see both receive sas and send sas.
# syslog debug on
# ipsec ike log message-info payload-info key-info
Tunnel
First, check that you have the necessary firewall rules in place. For a list of the rules, see Configuring a
Firewall Between the Internet and Your Customer Gateway Device (p. 11).
If your firewall rules are set up correctly, then continue troubleshooting with the following command:
TUNNEL[1]:
Description:
Interface type: IPsec
Current status is Online.
from 2011/08/15 18:19:45.
5 hours 7 minutes 58 seconds connection.
Received: (IPv4) 3933 packets [244941 octets]
(IPv6) 0 packet [0 octet]
Transmitted: (IPv4) 3933 packets [241407 octets]
(IPv6) 0 packet [0 octet]
Make sure that the current status value is online and that Interface type is IPsec. Make sure to
run the command on both tunnel interfaces. To resolve any problems here, review the configuration.
BGP
Use the following command:
195
Amazon Virtual Private Cloud Network Administrator Guide
Virtual Private Gateway Attachment
Here, both neighbors should be listed. For each, you should see a BGP state value of Active.
If the BGP peering is up, verify that your customer gateway router is advertising the default route
(0.0.0.0/0) to the VPC.
Total routes: 1
*: valid route
Network Next Hop Metric LocPrf Path
* default 0.0.0.0 0 IGP
Additionally, ensure that you're receiving the prefix corresponding to your VPC from the virtual private
gateway.
# show ip route
If you have questions or need further assistance, please use the Amazon VPC forum.
196
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway Connectivity
197
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway Connectivity
198
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway Connectivity
An IKE security association is required to exchange keys that are used to establish the
IPsec Security Association.
If no IKE security association exists, review your IKE configuration settings. You must
configure the encryption, authentication, perfect-forward-secrecy, and mode parameters
as listed in the customer gateway configuration.
An IPsec security association is the tunnel itself. Query your customer gateway to
determine if an IPsec Security Association is active. Proper configuration of the IPsec SA
is critical. You must configure the encryption, authentication, perfect-forward-secrecy,
and mode parameters as listed in the customer gateway configuration.
Confirm that the required firewall rules are set up (for a list of the rules, see Configuring
a Firewall Between the Internet and Your Customer Gateway Device (p. 11)). If they are,
move forward.
Each side of the tunnel has an IP address as specified in the customer gateway
configuration. The virtual private gateway address is the address used as the BGP
neighbor address. From your customer gateway, ping this address to determine if IP
traffic is being properly encrypted and decrypted.
If the ping isn't successful, review your tunnel interface configuration to make sure that
the proper IP address is configured.
If the tunnels are not in this state, review your BGP configuration.
If the BGP peering is established, you are receiving a prefix, and you are advertising a
prefix, your tunnel is configured correctly. Make sure that both tunnels are in this state,
and you're done.
Make sure that your virtual private gateway is attached to your VPC. Your integration
team does this with the AWS Management Console.
199
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway
Connectivity (without BGP)
For general testing instructions applicable to all customer gateways, see How to Test the Customer
Gateway Configuration (p. 166).
If you have questions or need further assistance, please use the Amazon VPC forum.
200
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway
Connectivity (without BGP)
201
Amazon Virtual Private Cloud Network Administrator Guide
Generic Device Customer Gateway
Connectivity (without BGP)
An IKE security association is required to exchange keys that are used to establish the
IPsec Security Association.
If no IKE security association exists, review your IKE configuration settings. You must
configure the encryption, authentication, perfect-forward-secrecy, and mode parameters
as listed in the customer gateway configuration.
An IPsec security association is the tunnel itself. Query your customer gateway to
determine if an IPsec Security Association is active. Proper configuration of the IPsec SA
is critical. You must configure the encryption, authentication, perfect-forward-secrecy,
and mode parameters as listed in the customer gateway configuration.
Confirm that the required firewall rules are set up (for a list of the rules, see Configuring
a Firewall Between the Internet and Your Customer Gateway Device (p. 11)). If they are,
move forward.
Each side of the tunnel has an IP address as specified in the customer gateway
configuration. The virtual private gateway address is the address used as the BGP
neighbor address. From your customer gateway, ping this address to determine if IP
traffic is being properly encrypted and decrypted.
If the ping isn't successful, review your tunnel interface configuration to make sure that
the proper IP address is configured.
Static Routing:
routes
For each tunnel, do the following:
• Verify that you have added a static route to your VPC CIDR with the tunnels as the next
hop.
• Verify that you have added a static route on the AWS Management Console, to tell the
VGW to route traffic back to your internal networks.
If the tunnels are not in this state, review your device configuration.
Make sure that both tunnels are in this state, and you're done.
Make sure that your virtual private gateway is attached to your VPC. Your integration
team does this in the AWS Management Console.
If you have questions or need further assistance, use the Amazon VPC forum.
202
Amazon Virtual Private Cloud Network Administrator Guide
Configuring Your Windows Server
Topics
• Configuring Your Windows Server (p. 203)
• Step 1: Create a VPN Connection and Configure Your VPC (p. 204)
• Step 2: Download the Configuration File for the VPN Connection (p. 205)
• Step 3: Configure the Windows Server (p. 206)
• Step 4: Set Up the VPN Tunnel (p. 208)
• Step 5: Enable Dead Gateway Detection (p. 213)
• Step 6: Test the VPN Connection (p. 214)
Take note of this address — you need it when you create the customer gateway in your VPC.
• Ensure the instance's security group rules allow outbound IPsec traffic. By default, a security group
allows all outbound traffic; however, if the security group's outbound rules have been modified from
203
Amazon Virtual Private Cloud Network Administrator Guide
Step 1: Create a VPN Connection and Configure Your VPC
their original state, you must create the following outbound custom protocol rules for IPsec traffic: IP
protocol 50, IP protocol 51, and UDP 500.
Take note of the CIDR range for your network in which the Windows server is located, for example,
172.31.0.0/16.
• Create a private subnet in your VPC (if you don't have one already) for launching instances that will
communicate with the Windows server. For more information, see Adding a Subnet to Your VPC.
Note
A private subnet is a subnet that does not have a route to an internet gateway. The routing for
this subnet is described in the next item.
• Update your route tables for the VPN connection:
• Add a route to your private subnet's route table with the virtual private gateway as the target, and
the Windows server's network (CIDR range) as the destination.
• Enable route propagation for the virtual private gateway. For more information, see Route Tables in
the Amazon VPC User Guide.
204
Amazon Virtual Private Cloud Network Administrator Guide
Step 2: Download the Configuration
File for the VPN Connection
• Create a security group configuration for your instances that allows communication between your VPC
and network:
• Add rules that allow inbound RDP or SSH access from your network. This enables you to connect
to instances in your VPC from your network. For example, to allow computers in your network to
access Linux instances in your VPC, create an inbound rule with a type of SSH, and the source set to
the CIDR range of your network; for example, 172.31.0.0/16. For more information, see Security
Groups for Your VPC in the Amazon VPC User Guide.
• Add a rule that allows inbound ICMP access from your network. This enables you to test your VPN
connection by pinging an instance in your VPC from your Windows server.
The configuration file contains a section of information similar to the following example. You see this
information presented twice, one time for each tunnel. Use this information when configuring the
Windows Server 2008 R2 server.
vgw-1a2b3c4d Tunnel1
--------------------------------------------------------------------
Local Tunnel Endpoint: 203.0.113.1
Remote Tunnel Endpoint: 203.83.222.237
Endpoint 1: [Your_Static_Route_IP_Prefix]
Endpoint 2: [Your_VPC_CIDR_Block]
Preshared key: xCjNLsLoCmKsakwcdoR9yX6GsEXAMPLE
The IP address for the customer gateway device—in this case, your Windows server—that terminates
the VPN connection on your network's side. If your customer gateway device is a Windows server
instance, this is the instance's private IP address.
Remote Tunnel Endpoint
One of two IP addresses for the virtual private gateway that terminates the VPN connection on the
AWS side.
Endpoint 1
The IP prefix that you specified as a static route when you created the VPN connection. These are the
IP addresses on your network that are allowed to use the VPN connection to access your VPC.
Endpoint 2
The IP address range (CIDR block) of the VPC attached to the virtual private gateway (for example
10.0.0.0/16).
205
Amazon Virtual Private Cloud Network Administrator Guide
Step 3: Configure the Windows Server
Preshared key
The pre-shared key that is used to establish the IPsec VPN connection between Local Tunnel
Endpoint and Remote Tunnel Endpoint.
We suggest that you configure both tunnels as part of the VPN connection. Each tunnel connects to a
separate VPN concentrator on the Amazon side of the VPN connection. Although only one tunnel at
a time is up, the second tunnel automatically establishes itself if the first tunnel goes down. Having
redundant tunnels ensure continuous availability in case of a device failure. Because only one tunnel is
available at a time, the Amazon VPC console indicates that one tunnel is down. This is expected behavior,
so there's no action required from you.
With two tunnels configured, if a device failure occurs within AWS, your VPN connection automatically
fails over to the second tunnel of the AWS virtual private gateway within a matter of minutes. When you
configure your customer gateway device, it's important that you configure both tunnels.
Note
From time to time, AWS performs routine maintenance on the virtual private gateway. This
maintenance may disable one of the two tunnels of your VPN connection for a brief period of
time. Your VPN connection automatically fails over to the second tunnel while we perform this
maintenance.
Additional information regarding the Internet Key Exchange (IKE) and IPsec Security Associations (SA) is
presented in the downloaded configuration file. Because the VPC VPN suggested settings are the same
as the Windows Server 2008 R2 default IPsec configuration settings, minimal work is needed on your
part.
MainModeSecMethods
The encryption and authentication algorithms for the IKE SA. These are the suggested settings
for the VPN connection, and are the default settings for Windows Server 2008 R2 IPsec VPN
connections.
MainModeKeyLifetime
The IKE SA key lifetime. This is the suggested setting for the VPN connection, and is the default
setting for Windows Server 2008 R2 IPsec VPN connections.
QuickModeSecMethods
The encryption and authentication algorithms for the IPsec SA. These are the suggested settings
for the VPN connection, and are the default settings for Windows Server 2008 R2 IPsec VPN
connections.
QuickModePFS
We suggest the use of master key perfect forward secrecy (PFS) for your IPsec sessions.
206
Amazon Virtual Private Cloud Network Administrator Guide
Step 3: Configure the Windows Server
1. In the Server Manager navigation pane, choose Roles, Network Policy and Access.
2. Open the context (right-click) menu for Routing and Remote Access Server and choose Configure
and Enable Routing and Remote Access.
3. In the Routing and Remote Access Setup Wizard, on the Welcome page, choose Next.
4. On the Configuration page, choose Custom Configuration, Next.
5. Choose LAN routing, Next.
6. Choose Finish.
7. When prompted by the Routing and Remote Access dialog box, choose Start service.
207
Amazon Virtual Private Cloud Network Administrator Guide
Step 4: Set Up the VPN Tunnel
Name: You can replace the suggested name (VGW-1a2b3c4d Tunnel 1) with a name of your choice.
LocalTunnelEndpoint: Enter the private IP address of the Windows server on your network.
Endpoint1: The CIDR block of your network on which the Windows server resides, for example,
172.31.0.0/16.
Endpoint2: The CIDR block of your VPC or a subnet in your VPC, for example, 10.0.0.0/16.
Run the updated script in a command prompt window. (The ^ enables you to cut and paste wrapped text
at the command line.) To set up the second VPN tunnel for this VPN connection, repeat the process using
the second netsh script in the configuration file.
When you are done, go to 2.4: Configure the Windows Firewall (p. 212).
For more information about the netsh parameters, go to Netsh AdvFirewall Consec Commands in the
Microsoft TechNet Library.
208
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
1. In the Server Manager navigation pane, expand Configuration, and then expand Windows Firewall
with Advanced Security.
2. Open the context (right-click) menu for Connection Security Rules and choose New Rule.
3. In the New Connection Security Rule wizard, on the Rule Type page, choose Tunnel, Next.
4. On the Tunnel Type page, under What type of tunnel would you like to create, choose Custom
Configuration. Under Would you like to exempt IPsec-protected connections from this tunnel,
leave the default value checked (No. Send all network traffic that matches this connection
security rule through the tunnel), and then choose Next.
5. On the Requirements page, choose Require authentication for inbound connections. Do not
establish tunnels for outbound connections, and then choose Next.
6. On Tunnel Endpoints page, under Which computers are in Endpoint 1, choose Add. Enter the CIDR
range of your network (behind your Windows server customer gateway device), and then choose OK.
The range can include the IP address of your customer gateway device.
7. Under What is the local tunnel endpoint (closest to computer in Endpoint 1), choose Edit. Enter
the private IP address of your Windows server, and then choose OK.
8. Under What is the remote tunnel endpoint (closest to computers in Endpoint 2), choose Edit.
Enter the IP address of the virtual private gateway for Tunnel 1 from the configuration file (see
Remote Tunnel Endpoint), and then choose OK.
Important
If you are repeating this procedure for Tunnel 2, be sure to select the endpoint for Tunnel 2.
9. Under Which computers are in Endpoint 2, choose Add. Enter the CIDR block of your VPC and
choose OK.
209
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
Important
You must scroll in the dialog box until you locate Which computers are in Endpoint 2. Do
not choose Next until you have completed this step, or you won't be able to connect to your
server.
10. Confirm that all the settings you've specified are correct and choose Next.
11. On the Authentication Method page, select Advanced, Customize.
12. Under First authentication methods, choose Add.
13. Select Pre-Shared key, enter the pre-shared key value from the configuration file, and choose OK.
Important
If you are repeating this procedure for Tunnel 2, be sure to select the pre-shared key for
Tunnel 2.
210
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
14. Ensure that First authentication is optional is not selected, and choose OK.
15. On the Authentication Method page, choose Next.
16. On the Profile page, select all three check boxes: Domain, Private, and Public. Choose Next.
17. On the Name page, enter a name for your connection rule and choose Finish.
Repeat the above procedure, specifying the data for Tunnel 2 from your configuration file.
After you've finished, you’ll have two tunnels configured for your VPN connection.
211
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
1. In the Server Manager navigation pane, expand the Configuration node, expand Windows Firewall
with Advanced Security, and then choose Connection Security Rules.
2. Verify the following for both tunnels:
• Enabled is Yes.
• Authentication mode is Require inbound and clear outbound.
• Authentication method is Custom.
• Endpoint 1 port is Any.
• Endpoint 2 port is Any.
• Protocol is Any.
3. Double-click the security rule for your first tunnel.
4. On the Computers tab, verify the following:
• Under Endpoint 1, the CIDR block range shown matches the CIDR block range of your network.
• Under Endpoint 2, the CIDR block range shown matches the CIDR block range of your VPC.
5. On the Authentication tab, under Method, choose Customize, and verify that First authentication
methods contains the correct pre-shared key from your configuration file for the tunnel. Choose OK.
6. On the Advanced tab, verify that Domain, Private, and Public are all selected.
7. Under IPsec tunneling, choose Customize. Verify the following IPsec tunneling settings.
1. In the Server Manager navigation pane, open the context (right-click) menu for Windows Firewall
with Advanced Security and choose Properties.
2. Choose IPsec Settings.
3. Under IPsec exemptions, verify that Exempt ICMP from IPsec is No (default). Verify that IPsec
tunnel authorization is None.
4. Under IPsec defaults, choose Customize.
5. In the Customize IPsec Settings dialog box, under Key exchange (Main Mode), select Advanced and
then choose Customize.
6. In Customize Advanced Key Exchange Settings, under Security methods, verify that these default
values are used for the first entry.
• Integrity: SHA-1
• Encryption: AES-CBC 128
212
Amazon Virtual Private Cloud Network Administrator Guide
Step 5: Enable Dead Gateway Detection
MainModeSecMethods: DHGroup2-AES128-SHA1,DHGroup2-3DES-SHA1
MainModeKeyLifetime: 480min,0sec
7. Under Key exchange options, select Use Diffie-Hellman for enhanced security, and then choose
OK.
8. Under Data protection (Quick Mode), choose Advanced, Customize.
9. Choose Require encryption for all connection security rules that use these settings.
10. Under Data integrity and encryption algorithms, leave the default values:
• Protocol: ESP
• Integrity: SHA-1
• Encryption: AES-CBC 128
• Lifetime: 60 minutes
These values correspond to the following entries from the configuration file.
QuickModeSecMethods:
ESP:SHA1-AES128+60min+100000kb,ESP:SHA1-3D ES+60min+100000kb
11. To return to the Customize IPsec Settings dialog box, choose OK. Choose OK.
213
Amazon Virtual Private Cloud Network Administrator Guide
Step 6: Test the VPN Connection
this step until you’ve completed the preceding sections. After you change the registry key, you must
reboot the server.
1. On the server, choose Start and type regedit to start Registry Editor.
2. Expand HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services, Tcpip, and Parameters.
3. In the other pane, open the context (right-click) menu for New, and select DWORD (32-bit) Value.
4. Enter the name EnableDeadGWDetect.
5. Open the context (right-click) menu for EnableDeadGWDetect and choose Modify.
6. In Value data, enter 1 and choose OK.
7. Close Registry Editor and reboot the server.
Connect to or log on to your Windows server, open the command prompt, and then use the ping
command to ping your instance using its private IP address; for example:
ping 10.0.0.4
214
Amazon Virtual Private Cloud Network Administrator Guide
Step 6: Test the VPN Connection
• Ensure that you have configured your security group rules to allow ICMP to the instance in your VPC.
If your Windows server is an EC2 instance, ensure that its security group's outbound rules allow IPsec
traffic. For more information, see Configuring Your Windows Server (p. 203).
• Ensure that the operating system on the instance you are pinging is configured to respond to ICMP. We
recommend that you use one of the Amazon Linux AMIs.
• If the instance you are pinging is a Windows instance, log in to the instance and enable inbound
ICMPv4 on the Windows firewall.
• Ensure that you have configured the route tables for your VPC or your subnet correctly. For more
information, see Step 1: Create a VPN Connection and Configure Your VPC (p. 204).
• If your customer gateway device is a Windows server instance, ensure that you've disabled source/
destination checking for the instance. For more information, see Configuring Your Windows
Server (p. 203).
In the Amazon VPC console, on the VPN Connections page, select your VPN connection. The first tunnel
is in the UP state. The second tunnel should be configured, but it isn't used unless the first tunnel goes
down. It may take a few moments to establish the encrypted tunnels.
215
Amazon Virtual Private Cloud Network Administrator Guide
Configuring Your Windows Server
Topics
• Configuring Your Windows Server (p. 216)
• Step 1: Create a VPN Connection and Configure Your VPC (p. 217)
• Step 2: Download the Configuration File for the VPN Connection (p. 218)
• Step 3: Configure the Windows Server (p. 219)
• Step 4: Set Up the VPN Tunnel (p. 220)
• Step 5: Enable Dead Gateway Detection (p. 226)
• Step 6: Test the VPN Connection (p. 227)
Take note of this address — you need it when you create the customer gateway in your VPC.
• Ensure the instance's security group rules allow outbound IPsec traffic. By default, a security group
allows all outbound traffic; however, if the security group's outbound rules have been modified from
216
Amazon Virtual Private Cloud Network Administrator Guide
Step 1: Create a VPN Connection and Configure Your VPC
their original state, you must create the following outbound custom protocol rules for IPsec traffic: IP
protocol 50, IP protocol 51, and UDP 500.
Take note of the CIDR range for your network in which the Windows server is located, for example,
172.31.0.0/16.
• Create a private subnet in your VPC (if you don't have one already) for launching instances to
communicate with the Windows server. For more information, see Adding a Subnet to Your VPC.
Note
A private subnet is a subnet that does not have a route to an internet gateway. The routing for
this subnet is described in the next item.
• Update your route tables for the VPN connection:
• Add a route to your private subnet's route table with the virtual private gateway as the target, and
the Windows server's network (CIDR range) as the destination.
• Enable route propagation for the virtual private gateway. For more information, see Route Tables in
the Amazon VPC User Guide.
217
Amazon Virtual Private Cloud Network Administrator Guide
Step 2: Download the Configuration
File for the VPN Connection
• Create a security group configuration for your instances that allows communication between your VPC
and network:
• Add rules that allow inbound RDP or SSH access from your network. This enables you to connect
to instances in your VPC from your network. For example, to allow computers in your network to
access Linux instances in your VPC, create an inbound rule with a type of SSH, and the source set to
the CIDR range of your network; for example, 172.31.0.0/16. For more information, see Security
Groups for Your VPC in the Amazon VPC User Guide.
• Add a rule that allows inbound ICMP access from your network. This enables you to test your VPN
connection by pinging an instance in your VPC from your Windows server.
The configuration file contains a section of information similar to the following example. You see this
information presented twice, one time for each tunnel. Use this information when configuring the
Windows Server 2012 R2 server.
vgw-1a2b3c4d Tunnel1
--------------------------------------------------------------------
Local Tunnel Endpoint: 203.0.113.1
Remote Tunnel Endpoint: 203.83.222.237
Endpoint 1: [Your_Static_Route_IP_Prefix]
Endpoint 2: [Your_VPC_CIDR_Block]
Preshared key: xCjNLsLoCmKsakwcdoR9yX6GsEXAMPLE
The IP address for the customer gateway—in this case, your Windows server—that terminates the
VPN connection on your network's side. If your customer gateway is a Windows server instance, this
is the instance's private IP address.
Remote Tunnel Endpoint
One of two IP addresses for the virtual private gateway that terminates the VPN connection on the
AWS side of the connection.
Endpoint 1
The IP prefix that you specified as a static route when you created the VPN connection. These are the
IP addresses in your network that are allowed to use the VPN connection to access your VPC.
Endpoint 2
The IP address range (CIDR block) of the VPC attached to the virtual private gateway (for example
10.0.0.0/16).
218
Amazon Virtual Private Cloud Network Administrator Guide
Step 3: Configure the Windows Server
Preshared key
The pre-shared key that is used to establish the IPsec VPN connection between Local Tunnel
Endpoint and Remote Tunnel Endpoint.
We suggest that you configure both tunnels as part of the VPN connection. Each tunnel connects to a
separate VPN concentrator on the Amazon side of the VPN connection. Although only one tunnel at
a time is up, the second tunnel automatically establishes itself if the first tunnel goes down. Having
redundant tunnels ensure continuous availability in the case of a device failure. Because only one tunnel
is available at a time, the Amazon VPC console indicates that one tunnel is down. This is expected
behavior, so there's no action required from you.
With two tunnels configured, if a device failure occurs within AWS, your VPN connection automatically
fails over to the second tunnel of the AWS virtual private gateway within a matter of minutes. When you
configure your customer gateway device, it's important that you configure both tunnels.
Note
From time to time, AWS performs routine maintenance on the virtual private gateway. This
maintenance may disable one of the two tunnels of your VPN connection for a brief period of
time. Your VPN connection automatically fails over to the second tunnel while we perform this
maintenance.
Additional information regarding the Internet Key Exchange (IKE) and IPsec Security Associations (SA) is
presented in the downloaded configuration file. Because the VPC VPN suggested settings are the same
as the Windows Server 2012 R2 default IPsec configuration settings, minimal work is needed on your
part.
MainModeSecMethods: DHGroup2-AES128-SHA1
MainModeKeyLifetime: 480min,0sess
QuickModeSecMethods: ESP:SHA1-AES128+60min+100000kb
QuickModePFS: DHGroup2
MainModeSecMethods
The encryption and authentication algorithms for the IKE SA. These are the suggested settings
for the VPN connection, and are the default settings for Windows Server 2012 R2 IPsec VPN
connections.
MainModeKeyLifetime
The IKE SA key lifetime. This is the suggested setting for the VPN connection, and is the default
setting for Windows Server 2012 R2 IPsec VPN connections.
QuickModeSecMethods
The encryption and authentication algorithms for the IPsec SA. These are the suggested settings
for the VPN connection, and are the default settings for Windows Server 2012 R2 IPsec VPN
connections.
QuickModePFS
We suggest that you use master key perfect forward secrecy (PFS) for your IPsec sessions.
219
Amazon Virtual Private Cloud Network Administrator Guide
Step 4: Set Up the VPN Tunnel
1. On the dashboard, choose Notifications (the flag icon). There should be a task to complete the post-
deployment configuration. Choose the Open the Getting Started Wizard link.
2. Choose Deploy VPN only.
3. In the Routing and Remote Access dialog box, choose the server name, choose Action, and select
Configure and Enable Routing and Remote Access.
4. In the Routing and Remote Access Server Setup Wizard, on the first page, choose Next.
5. On the Configuration page, choose Custom Configuration, Next.
6. Choose LAN routing, Next, Finish.
7. When prompted by the Routing and Remote Access dialog box, choose Start service.
220
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
Name: You can replace the suggested name (vgw-1a2b3c4d Tunnel 1) with a name of your choice.
LocalTunnelEndpoint: Enter the private IP address of the Windows server on your network.
Endpoint1: The CIDR block of your network on which the Windows server resides, for example,
172.31.0.0/16.
Endpoint2: The CIDR block of your VPC or a subnet in your VPC, for example, 10.0.0.0/16.
Run the updated script in a command prompt window on your Windows server. (The ^ enables you to cut
and paste wrapped text at the command line.) To set up the second VPN tunnel for this VPN connection,
repeat the process using the second netsh script in the configuration file.
When you are done, go to 2.4: Configure the Windows Firewall (p. 225).
For more information about the netsh parameters, go to Netsh AdvFirewall Consec Commands in the
Microsoft TechNet Library.
Topics
• 2.1: Configure a Security Rule for a VPN Tunnel (p. 221)
• 2.3: Confirm the Tunnel Configuration (p. 224)
• Enable Master Key Perfect Forward Secrecy (p. 224)
1. Open Server Manager, choose Tools, and select Windows Firewall with Advanced Security.
2. Select Connection Security Rules, choose Action, and then New Rule.
3. In the New Connection Security Rule wizard, on the Rule Type page, choose Tunnel, and then
choose Next.
4. On the Tunnel Type page, under What type of tunnel would you like to create, choose Custom
configuration. Under Would you like to exempt IPsec-protected connections from this tunnel,
221
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
leave the default value checked (No. Send all network traffic that matches this connection
security rule through the tunnel), and then choose Next.
5. On the Requirements page, choose Require authentication for inbound connections. Do not
establish tunnels for outbound connections, and then choose Next.
6. On Tunnel Endpoints page, under Which computers are in Endpoint 1, choose Add. Enter the
CIDR range of your network (behind your Windows server customer gateway device; for example,
172.31.0.0/16 ), and then choose OK. The range can include the IP address of your customer
gateway device.
7. Under What is the local tunnel endpoint (closest to computer in Endpoint 1), choose Edit. In the
IPv4 address field, enter the private IP address of your Windows server, and then choose OK.
8. Under What is the remote tunnel endpoint (closest to computers in Endpoint 2), choose Edit. In
the IPv4 address field, enter the IP address of the virtual private gateway for Tunnel 1 from the
configuration file (see Remote Tunnel Endpoint), and then choose OK.
Important
If you are repeating this procedure for Tunnel 2, be sure to select the endpoint for Tunnel 2.
9. Under Which computers are in Endpoint 2, choose Add. In the This IP address or subnet field,
enter the CIDR block of your VPC, and then choose OK.
Important
You must scroll in the dialog box until you locate Which computers are in Endpoint 2. Do
not choose Next until you have completed this step, or you won't be able to connect to your
server.
222
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
10. Confirm that all the settings you've specified are correct and choose Next.
11. On the Authentication Method page, select Advanced and choose Customize.
12. Under First authentication methods, choose Add.
13. Select Preshared key, enter the pre-shared key value from the configuration file and choose OK.
Important
If you are repeating this procedure for Tunnel 2, be sure to select the pre-shared key for
Tunnel 2.
14. Ensure that First authentication is optional is not selected, and choose OK.
15. Choose Next.
16. On the Profile page, select all three check boxes: Domain, Private, and Public. Choose Next.
223
Amazon Virtual Private Cloud Network Administrator Guide
Option 2: Use the Windows Server User Interface
17. On the Name page, enter a name for your connection rule; for example, VPN to AWS Tunnel 1,
and then choose Finish.
Repeat the above procedure, specifying the data for Tunnel 2 from your configuration file.
After you've finished, you’ll have two tunnels configured for your VPN connection.
1. Open Server Manager, choose Tools, select Windows Firewall with Advanced Security, and then
select Connection Security Rules.
2. Verify the following for both tunnels:
• Enabled is Yes
• Endpoint 1 is the CIDR block for your network
• Endpoint 2 is the CIDR block of your VPC
• Authentication mode is Require inbound and clear outbound
• Authentication method is Custom
• Endpoint 1 port is Any
• Endpoint 2 port is Any
• Protocol is Any
3. Select the first rule and choose Properties.
4. On the Authentication tab, under Method, choose Customize, and verify that First authentication
methods contains the correct pre-shared key from your configuration file for the tunnel, and then
choose OK.
5. On the Advanced tab, verify that Domain, Private, and Public are all selected.
6. Under IPsec tunneling, choose Customize. Verify the following IPsec tunneling settings, and then
choose OK and OK again to close the dialog box.
224
Amazon Virtual Private Cloud Network Administrator Guide
2.4: Configure the Windows Firewall
3. Repeat step 2 for the second tunnel, this time replacing rule_name with the name that you gave
the second connection rule.
1. Open Server Manager, choose Tools, select Windows Firewall with Advanced Security, and then
choose Properties.
2. On the IPsec Settings tab, under IPsec exemptions, verify that Exempt ICMP from IPsec is No
(default). Verify that IPsec tunnel authorization is None.
3. Under IPsec defaults, choose Customize.
4. Under Key exchange (Main Mode), select Advanced and then choose Customize.
5. In Customize Advanced Key Exchange Settings, under Security methods, verify that these default
values are used for the first entry.
• Integrity: SHA-1
• Encryption: AES-CBC 128
• Key exchange algorithm: Diffie-Hellman Group 2
• Under Key lifetimes, verify that Minutes is 480 and Sessions is 0.
MainModeSecMethods: DHGroup2-AES128-SHA1,DHGroup2-3DES-SHA1
MainModeKeyLifetime: 480min,0sec
6. Under Key exchange options, select Use Diffie-Hellman for enhanced security, and then choose
OK.
7. Under Data protection (Quick Mode), select Advanced, and then choose Customize.
8. Select Require encryption for all connection security rules that use these settings.
9. Under Data integrity and encryption, leave the default values:
• Protocol: ESP
• Integrity: SHA-1
• Encryption: AES-CBC 128
• Lifetime: 60 minutes
These values correspond to the following entry from the configuration file.
QuickModeSecMethods:
ESP:SHA1-AES128+60min+100000kb
10. Choose OK to return to the Customize IPsec Settings dialog box and choose OK again to save the
configuration.
225
Amazon Virtual Private Cloud Network Administrator Guide
Step 5: Enable Dead Gateway Detection
1. From your Windows server, launch the command prompt or a PowerShell session, and type regedit
to start Registry Editor.
2. Expand HKEY_LOCAL_MACHINE, expand SYSTEM, expand CurrentControlSet, expand Services,
expand Tcpip, and then expand Parameters.
3. From the Edit menu, select New and select DWORD (32-bit) Value.
4. Enter the name EnableDeadGWDetect.
5. Select EnableDeadGWDetect and choose Edit, Modify.
6. In Value data, enter 1, and then choose OK.
7. Close the Registry Editor and reboot the server.
226
Amazon Virtual Private Cloud Network Administrator Guide
Step 6: Test the VPN Connection
Connect to or log on to your Windows server, open the command prompt, and then use the ping
command to ping your instance using its private IP address; for example:
ping 10.0.0.4
• Ensure that you have configured your security group rules to allow ICMP to the instance in your VPC.
If your Windows server is an EC2 instance, ensure that its security group's outbound rules allow IPsec
traffic. For more information, see Configuring Your Windows Server (p. 216).
• Ensure that the operating system on the instance you are pinging is configured to respond to ICMP. We
recommend that you use one of the Amazon Linux AMIs.
• If the instance you are pinging is a Windows instance, connect to the instance and enable inbound
ICMPv4 on the Windows firewall.
• Ensure that you have configured the route tables correctly for your VPC or your subnet. For more
information, see Step 1: Create a VPN Connection and Configure Your VPC (p. 217).
• If your customer gateway device is a Windows server instance, ensure that you've disabled source/
destination checking for the instance. For more information, see Configuring Your Windows
Server (p. 216).
227
Amazon Virtual Private Cloud Network Administrator Guide
Step 6: Test the VPN Connection
In the Amazon VPC console, on the VPN Connections page, select your VPN connection. The first tunnel
is in the UP state. The second tunnel should be configured, but it isn't used unless the first tunnel goes
down. It may take a few moments to establish the encrypted tunnels.
228
Amazon Virtual Private Cloud Network Administrator Guide
Document History
For more information about the important changes in each release of the AWS Site-to-Site VPN Network
Administrator Guide, see Document History in the Amazon VPC User Guide.
229