Creating a VPN Connection
You can create a VPN connection between your corporate network and one of your Nets in the OUTSCALE Cloud.
This action creates a secure VPN tunnel between a client gateway and a virtual gateway. The VPN connection remains in the pending
state until traffic is generated from the client gateway. For more information, see About VPN Connections.
After you create a VPN connection, you need to configure it. For more information, see Tutorial: Setting Up a VPN Connection.
Creating a VPN Connection Using Cockpit v2
Before you begin:
|
-
In the VPN Connections dashboard, click
Create VPN Connection.
The CREATE VPN CONNECTION dialog box appears. -
Specify the following information:
-
In the Name field, type a name for the VPN connection.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
From the Client Gateway ID list, select the ID of the client gateway you want to use.
-
From the Virtual Gateway ID list, select the ID of the virtual gateway you want to use.
-
From the Routing list, select the type of routing you want to use. For more information, see About Network and Routing Configuration for VPN Connections > Static and Dynamic Routing and Managing Routes for Your VPN Connections.
If you select static routing, you can create routes for the VPN connection. If you select dynamic routing, you do not need to create routes. For more information, see Creating a VPN Connection Route.
-
-
Click Create VPN Connection.
The VPN connection is created.To download the configuration information in XML format, select the VPN connection and click
Configuration.
Creating a VPN Connection Using OSC CLI
Before you begin:
|
The CreateVpnConnection command creates a VPN connection between a specified virtual gateway and a specified client gateway.
You can create only one VPN connection between a virtual gateway and a client gateway.
This action can be done only if the virtual gateway is in the For more information, see About VPN Connections. |
$ osc-cli api CreateVpnConnection --profile "default" \
--ClientGatewayId "cgw-12345678" \
--VirtualGatewayId "vgw-12345678" \
--ConnectionType "ipsec.1" \
--StaticRoutesOnly True
This command contains the following attributes that you need to specify:
-
ClientGatewayId
: The ID of the client gateway. -
ConnectionType
: The type of VPN connection (alwaysipsec.1
). -
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
StaticRoutesOnly
: (optional) By default or if false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute. -
VirtualGatewayId
: The ID of the virtual gateway.
The CreateVpnConnection command returns the following elements:
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
VpnConnection
: Information about a VPN connection.-
ClientGatewayConfiguration
: Example configuration for the client gateway. -
ClientGatewayId
: The ID of the client gateway used on the client end of the connection. -
ConnectionType
: The type of VPN connection (alwaysipsec.1
). -
Routes
: Information about one or more static routes associated with the VPN connection, if any.-
DestinationIpRange
: The IP range used for the destination match, in CIDR notation (for example,10.0.0.0/24
). -
RouteType
: The type of route (alwaysstatic
). -
State
: The current state of the static route (pending
|available
|deleting
|deleted
).
-
-
State
: The state of the VPN connection (pending
|available
|deleting
|deleted
). -
StaticRoutesOnly
: If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute. -
Tags
: One or more tags associated with the VPN connection.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
VgwTelemetries
: Information about the current state of one or more of the VPN tunnels.-
AcceptedRouteCount
: The number of routes accepted through BGP (Border Gateway Protocol) route exchanges. -
LastStateChangeDate
: The date and time (UTC) of the latest state update. -
OutsideIpAddress
: The IP on the OUTSCALE side of the tunnel. -
State
: The state of the IPSEC tunnel (UP
|DOWN
). -
StateDescription
: A description of the current state of the tunnel.
-
-
VirtualGatewayId
: The ID of the virtual gateway used on the OUTSCALE end of the connection. -
VpnConnectionId
: The ID of the VPN connection. -
VpnOptions
: Information about the VPN options.-
Phase1Options
: Information about Phase 1 of the Internet Key Exchange (IKE) negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 negotiations.-
DpdTimeoutAction
: The action to carry out after a Dead Peer Detection (DPD) timeout occurs. -
DpdTimeoutSeconds
: The maximum waiting time for a Dead Peer Detection (DPD) response before considering the peer as dead, in seconds. -
IkeVersions
: The Internet Key Exchange (IKE) versions allowed for the VPN tunnel. -
Phase1DhGroupNumbers
: The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 1. -
Phase1EncryptionAlgorithms
: The encryption algorithms allowed for the VPN tunnel for phase 1. -
Phase1IntegrityAlgorithms
: The integrity algorithms allowed for the VPN tunnel for phase 1. -
Phase1LifetimeSeconds
: The lifetime for phase 1 of the IKE negotiation process, in seconds. -
ReplayWindowSize
: The number of packets in an IKE replay window. -
StartupAction
: The action to carry out when establishing tunnels for a VPN connection.
-
-
Phase2Options
: Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.-
Phase2DhGroupNumbers
: The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 2. -
Phase2EncryptionAlgorithms
: The encryption algorithms allowed for the VPN tunnel for phase 2. -
Phase2IntegrityAlgorithms
: The integrity algorithms allowed for the VPN tunnel for phase 2. -
Phase2LifetimeSeconds
: The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation process, in seconds. -
PreSharedKey
: The pre-shared key to establish the initial authentication between the client gateway and the virtual gateway. This key can contain any character except line breaks and double quotes (").
-
-
TunnelInsideIpRange
: The range of inside IPs for the tunnel. This must be a /30 CIDR block from the 169.254.254.0/24 range.
-
-
{
"VpnConnection": {
"Routes": [],
"Tags": [],
"ClientGatewayConfiguration": "...",
"StaticRoutesOnly": true,
"VirtualGatewayId": "vgw-12345678",
"ConnectionType": "ipsec.1",
"ClientGatewayId": "cgw-12345678",
"State": "pending",
"VgwTelemetries": [
{
"StateDescription": "IPSEC IS DOWN",
"AcceptedRouteCount": 0,
"LastStateChangeDate": "2017-05-10T12:34:56.789Z",
"OutsideIpAddress": "192.0.2.0"
}
],
"VpnConnectionId": "vpn-12345678"
},
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Creating a VPN Connection Using AWS CLI
Before you begin:
|
To create a VPN connection, use the create-vpn-connection command following this syntax:
$ aws ec2 create-vpn-connection \
--profile YOUR_PROFILE \
--customer-gateway-id cgw-f491f6d9 \
--vpn-gateway-id vgw-00ac2c82 \
--type ipsec.1 \
--options {\"StaticRoutesOnly\":true} \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
customer-gateway-id
: The ID of the customer gateway you want to use. For more information, see Managing Your Client Gateways. -
vpn-gateway-id
: The ID of the virtual private gateway you want to use. For more information, see Managing Your Virtual Gateways. -
type
: The type of VPN connection (alwaysipsec.1
). For more information, see About VPN Connections. -
(optional)
options
: Information about the routing options for the VPN connection. This attribute contains the following element that you need to specify:-
StaticRoutesOnly
: By default or if set tofalse
, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If set totrue
, it uses static routing. For more information, see About Routing Configuration for VPN Connections.
-
-
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The create-vpn-connection command returns the following elements:
-
VpnConnection
: Information about the newly created VPN connection. This element contains the following information:-
VpnConnectionId
: The ID of the VPN connection. -
Tags
: One or more tags associated with the VPC peering connection. This element contains the following information:-
Key
: The key of the tag. -
Value
: The value of the tag.
-
-
CustomerGatewayConfiguration
: Example configuration for the customer gateway, in XML format. For more information, see Tutorial: Setting Up a VPN Connection. -
Routes
: Information about the static routes associated with the connection, if any. This element contains the following information:-
DestinationCidrBlock
: The destination range of IPs of the route, in CIDR notation. -
Source
: The type of route (alwaysstatic
). -
State
: The state of the static route (pending
|available
|deleting
|deleted
).
-
-
VgwTelemetry
: Information about the state of the VPN tunnel. This element contains the following information:-
Status
: The state of the VPN tunnel (UP
|DOWN
). For more information, see About VPN Connections. -
AcceptedRouteCount
: The number of accepted routes through the Border Gateway Protocol (BGP) route exchanges. -
OutsideIpAddress
: The IP on the external interface of the virtual private gateway. -
LastStatusChange
: The date and time of the last state change of the VPN tunnel. -
StatusMessage
: A description of the current state of the VPN tunnel.
-
-
State
: The state of the VPN connection (pending
|available
|deleting
|deleted
). For more information, see About VPN Connections. -
VpnGatewayId
: The ID of the virtual private gateway. -
CustomerGatewayId
: The ID of the customer gateway. -
Type
: The type of VPN connection (alwaysipsec.1
). -
Options
: Information about the routing options of the VPN connection. This element contains the following information:-
StaticRoutesOnly
: By default or if set tofalse
, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If set totrue
, it uses static routing. For more information, see About Routing Configuration for VPN Connections.
-
-
{
"VpnConnection": {
"VpnConnectionId": "vpn-c750ea06",
"Tags": [],
"CustomerGatewayConfiguration": CONFIGURATION_INFORMATION,
"Routes": [],
"VgwTelemetry": [
{
"Status": "DOWN",
"AcceptedRouteCount": 0,
"OutsideIpAddress": "171.33.67.245",
"LastStatusChange": "2017-02-01T14:08:51.649Z",
"StatusMessage": "IPSEC IS DOWN"
}
],
"State": "pending",
"VpnGatewayId": "vgw-00ac2c82",
"CustomerGatewayId": "cgw-f491f6d9",
"Type": "ipsec.1",
"Options": {
"StaticRoutesOnly": false
}
}
}
The VPN connection is created.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.