Buying a VPN Gateway

Scenarios

To connect your ECSs in a VPC to your on-premises network, you must first buy a VPN gateway. If you choose to buy a pay-per-use VPN gateway, a VPN connection will be created together with the VPN gateway.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click Service List in the upper left corner. Under Networking, select Virtual Private Network.
  4. In the navigation pane on the left, choose Virtual Private Network > VPN Gateways.
  5. On the VPN Gateways page, click Buy VPN Gateway.
  6. Configure the parameters based on Table 1 and click Buy Now.
    Table 1 VPN gateway parameter description

    Parameter

    Description

    Example Value

    Billing Mode

    The billing mode of a VPN gateway, which can be pay-per-use or yearly/monthly

    Pay-per-use: When you buy a pay-per-use VPN gateway, you must buy a VPN connection together with the VPN gateway.

    Yearly/Monthly: When you buy a yearly/monthly VPN gateway, the price includes the gateway bandwidth price and the price of the VPN connections that can be created for the gateway.

    Pay-per-use

    Region

    Regions are geographic areas that are physically isolated from each other. The networks inside different regions are not connected to each other, so resources cannot be shared across different regions. For lower network latency and faster access to your resources, select the nearest region.

    CN North-Beijing1

    Name

    The name of the VPN gateway

    vpngw-001

    VPC

    The name of the VPC that the VPN connects to

    vpc-001

    Type

    The VPN type. IPsec is selected by default.

    IPsec

    Billed By

    A pay-per-use VPN gateway can be billed by bandwidth or by traffic.

    A yearly/monthly VPN gateway can only be billed by bandwidth.

    • Bandwidth: You specify a bandwidth and pay the bill based on the amount of time you use the bandwidth.
    • Traffic: You specify a bandwidth and pay for the total traffic you generate.

    Traffic

    Bandwidth (Mbit/s)

    The bandwidth (Mbit/s) of the VPN gateway. The bandwidth is shared by all VPN connections created for the VPN gateway. The total bandwidth size used by all VPN connections created for a VPN gateway cannot exceed the VPN gateway bandwidth size.

    During the use of VPN, if the network traffic exceeds the VPN gateway bandwidth, network congestion may occur and VPN connections may be interrupted. Plan sufficient bandwidth in advance.

    You can configure alarm rules on Cloud Eye to monitor the bandwidth.

    100

    Required VPN Connections

    The number of VPN connections that you require.

    This parameter is available only when the billing mode is Yearly/Monthly.

    The number can only be 10, 20, 30, 40, 50, 100, 200, 300, 400, or 500.

    20

    Required Duration

    The required duration of the VPN gateway. You can buy a VPN gateway by month or by year.

    This parameter is available only when the billing mode is Yearly/Monthly.

    1 year

    Description

    Supplementary information about the VPN gateway

    N/A

    When you buy a pay-per-use VPN gateway, you also need to configure a VPN connection that will be created together with the gateway (excepting the CN South-Shenzhen region). For details, see Table 2.

    Table 2 VPN connection parameter description

    Parameter

    Description

    Example Value

    Name

    The VPN connection name

    vpn-001

    VPN Gateway

    The name of the VPN gateway used by the VPN connection

    vpcgw-001

    Local Subnet

    The VPC subnets that will access your on-premises network through a VPN. You can set the local subnet using either of the following methods:

    • Select subnet: Select the subnets that will access your on-premises network through a VPN.
    • Specify CIDR block: Enter the CIDR blocks that will access your on-premises network through a VPN.
      NOTE:

      CIDR blocks of local subnets cannot overlap.

    192.168.1.0/24,

    192.168.2.0/24

    Remote Gateway

    The public IP address of the gateway in your data center or on the private network. This IP address is used for communicating with your VPC.

    N/A

    Remote Subnet

    The subnets of your on-premises network that will access a VPC through a VPN. The remote and local subnets cannot overlap with each other. The remote subnet cannot overlap with CIDR blocks involved in existing VPC peering, Direct Connect, or Cloud Connect connections created for the local VPC.

    NOTE:

    CIDR blocks of remote subnets cannot overlap.

    192.168.3.0/24,

    192.168.4.0/24

    PSK

    The pre-shared key, which can contain 6 to 128 characters

    PSKs configured at both ends of a VPN connection must be the same.

    The PSK

    • Must contain 6 to 128 characters.
    • Can contain only:
      • Digits
      • Letters
      • Special characters: ~`!@#$%^()-_+=[]{}|\,./:;

    Test@123

    Confirm PSK

    Enter the pre-shared key again.

    Test@123

    Advanced Settings

    • Default: Use default IKE and IPsec policies.
    • Custom: Custom IKE and IPsec policies. For details about the policies, see Table 3 and Table 4.

    Custom

    Table 3 IKE policy

    Parameter

    Description

    Example Value

    Authentication Algorithm

    The hash algorithm used for authentication, which can be SHA1, SHA2-256, SHA2-384, SHA2-512, or MD5

    The default algorithm is SHA2-256.

    SHA2-256

    Encryption Algorithm

    The encryption algorithm, which can be AES-128, AES-192, AES-256, or 3DES

    3DES is not recommended because it is not strong enough to protect data.

    The default algorithm is AES-128.

    AES-128

    DH Algorithm

    The Diffie-Hellman key exchange algorithm, which can be Group 1, Group 2, Group 5, Group 14 , Group 15, Group 16, Group 19, Group 20, or Group 21

    The default algorithm is Group 14. DH algorithms configured at both ends of a VPN connection must be the same. Otherwise, the negotiation will fail.

    Group 14

    Version

    The version of the IKE protocol, which can be v1 or v2 (default)

    v2

    Lifecycle (s)

    The lifetime of the SA, in seconds

    The SA will be renegotiated if its lifetime expires.

    The default lifecycle is 86400 seconds.

    86400

    Table 4 IPsec policy

    Parameter

    Description

    Example Value

    Authentication Algorithm

    The hash algorithm used for authentication, which can be SHA1, SHA2-256, SHA2-384, SHA2-512, or MD5

    The default algorithm is SHA2-256.

    SHA2-256

    Encryption Algorithm

    The encryption algorithm, which can be AES-128, AES-192, AES-256, or 3DES

    3DES is not recommended because it is not strong enough to protect data.

    The default algorithm is AES-128.

    AES-128

    PFS

    The perfect forward secrecy (PFS), which is used to configure the IPsec tunnel negotiation.

    The PFS algorithm can be DH group 1, DH group 2, DH group 5, DH group 14, DH group 15, DH group 16, DH group 19, DH group 20, or DH group 21.

    The default algorithm is DH group 14.

    DH group 14

    Transfer Protocol

    The security protocol used for IPsec to transmit and encapsulate user data, which can be AH, ESP, or AH-ESP

    The default protocol is ESP.

    ESP

    Lifecycle (s)

    The lifetime of the SA, in seconds

    The SA will be renegotiated if its lifetime expires.

    The default lifecycle is 3600 seconds.

    3600

    For security reasons, the following algorithms are not recommended.

    Authentication Algorithm: SHA1 and MD5

    Encryption Algorithm: 3DES

    DH algorithm: Group 1, Group 2, and Group 5.

  7. Confirm the VPN gateway information and click Buy Now.

    After a VPN gateway is created, the system automatically assigns a public IP address, that is, the IP address displayed in the Gateway IP Address column in the VPN gateway list. The gateway IP address is also the remote gateway IP address configured on the on-premises VPN network. Figure 1 shows the gateway IP address.

    Figure 1 VPN gateway list

    After a yearly/monthly VPN gateway is created, its status displayed in the VPN gateway list is Not connected and will change to Normal when a VPN connection uses this gateway.