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:

  1. In the VPN Connections dashboard, click IconAddFull Create VPN Connection.
    The CREATE VPN CONNECTION dialog box appears.

  2. Specify the following information:

    1. 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.

    2. From the Client Gateway ID list, select the ID of the client gateway you want to use.

    3. From the Virtual Gateway ID list, select the ID of the virtual gateway you want to use.

    4. 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.

  3. Click Create VPN Connection.
    The VPN connection is created.

    To download the configuration information in XML format, select the VPN connection and click IconSetting 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 available state.

For more information, see About VPN Connections.

Request sample
$ 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 (only ipsec.1 is supported).

  • 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.

  • VpnConnection: Information about a VPN connection.

Result sample
{
  "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:

Request sample
$ 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 (always ipsec.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 to false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If set to true, 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.

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 (always static).

      • 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 (always ipsec.1).

    • Options: Information about the routing options of the VPN connection. This element contains the following information:

      • StaticRoutesOnly: By default or if set to false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If set to true, it uses static routing. For more information, see About Routing Configuration for VPN Connections.

Result sample
{
    "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.