Creating a Virtual Gateway

You can create a virtual gateway to attach to a Net. You can then set up a VPN connection between the Net and a client gateway. For more information, see Tutorial: Setting Up a VPN Connection.

You can create the virtual gateway before or after creating the Net.

Creating a Virtual Gateway Using Cockpit v2

  1. In the Virtual Gateways dashboard, click IconAddFull Create Virtual Gateway.
    The CREATE VIRTUAL GATEWAY dialog box appears.

  2. In the Name field, type a name for the virtual gateway.

  3. Click Create.
    The virtual gateway is created.

Creating a Virtual Gateway Using OSC CLI

The CreateVirtualGateway command creates a virtual gateway.
A virtual gateway is the access point on the Net side of a VPN connection.

For more information, see About Virtual Gateways.

Request sample
$ osc-cli api CreateVirtualGateway --profile "default" \
    --ConnectionType "ipsec.1"

This command contains the following attributes that you need to specify:

  • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreateVirtualGateway command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • VirtualGateway: Information about the virtual gateway.

    • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

    • NetToVirtualGatewayLinks: The Net to which the virtual gateway is attached.

      • NetId: The ID of the Net to which the virtual gateway is attached.

      • State: The state of the attachment (attaching | attached | detaching | detached).

    • State: The state of the virtual gateway (pending | available | deleting | deleted).

    • Tags: One or more tags associated with the virtual gateway.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VirtualGatewayId: The ID of the virtual gateway.

Result sample
{
  "VirtualGateway": {
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "NetToVirtualGatewayLinks": [],
    "State": "available",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Creating a Virtual Gateway Using oapi-cli

The CreateVirtualGateway command creates a virtual gateway.
A virtual gateway is the access point on the Net side of a VPN connection.

For more information, see About Virtual Gateways.

Request sample
$ oapi-cli --profile "default" CreateVirtualGateway \
    --ConnectionType "ipsec.1"

This command contains the following attributes that you need to specify:

  • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreateVirtualGateway command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • VirtualGateway: Information about the virtual gateway.

    • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

    • NetToVirtualGatewayLinks: The Net to which the virtual gateway is attached.

      • NetId: The ID of the Net to which the virtual gateway is attached.

      • State: The state of the attachment (attaching | attached | detaching | detached).

    • State: The state of the virtual gateway (pending | available | deleting | deleted).

    • Tags: One or more tags associated with the virtual gateway.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VirtualGatewayId: The ID of the virtual gateway.

Result sample
{
  "VirtualGateway": {
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "NetToVirtualGatewayLinks": [],
    "State": "available",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Creating a Virtual Private Gateway Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To create a virtual private gateway, use the create-vpn-gateway command following this syntax:

Request sample
$ aws ec2 create-vpn-gateway \
    --profile YOUR_PROFILE \
    --type ipsec.1 \
    --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.

  • type: The type of VPN connection the virtual private gateway supports (always ipsec.1).

  • 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-gateway command returns the following elements:

  • State: The state of the virtual private gateway (pending | available | deleting | deleted). For more information, see About Virtual Private Gateways > Lifecycle.

  • Tags: One or more tags associated with the virtual private gateway. This element contains the following information:

    • Key: The key of the tag.

    • Value: The value of the tag.

  • Type: The type of VPN connection the virtual private gateway supports (always ipsec.1).

  • VpnGatewayId: The ID of the virtual private gateway.

  • VpcAttachments: The VPC to which the virtual private gateway is attached, if any. This element contains the following information:

Result sample
 {
    "VpnGateway": {
        "State": "available",
        "Tags": [],
        "Type": "ipsec.1",
        "VpnGatewayId": "vgw-ce550be4",
        "VpcAttachments": []
    }
}

The virtual private gateway 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.