Updated on 2026-10-26 GMT+08:00

Creating a VPN Gateway

Scenario

P2C VPN allows users to securely access applications and services deployed in a VPC from local terminals. To use P2C VPN, you need to create a VPN gateway first.

Limitations and Constraints

You can create a maximum of 50 VPN gateways.

Prerequisites

  • A VPC has been created. For details about how to create a VPC, see Creating a VPC and Subnet.
  • Security group rules have been configured for the VPC, and ECSs can communicate with other devices on the cloud. For details about how to configure security group rules, see Security Group Rules.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner, and choose Networking > Virtual Private Network.
  4. In the navigation pane on the left, choose Virtual Private Network > Enterprise – VPN Gateways.
  5. Click the P2C VPN Gateways tab, and then click Buy P2C VPN Gateway.
  6. Set parameters as prompted and click Buy Now.

    Table 1 describes the VPN gateway parameters.

    Table 1 Description of VPN gateway parameters

    Parameter

    Description

    Example Value

    Billing Mode

    The value can only be Yearly/Monthly.

    Yearly/Monthly

    Region

    For low network latency and fast resource access, select the region nearest to your target users.

    Resources cannot be shared across regions.

    Set this parameter based on the actual condition.

    Name

    Enter the name of a VPN gateway.

    p2c-vpngw-001

    VPC

    Select a VPC.

    vpc-001(192.168.0.0/16)

    Interconnection Subnet

    Specify the subnet used by the VPN gateway to access the VPC. Ensure that the selected interconnection subnet has three or more assignable IP addresses.

    192.168.66.0/24

    Specification

    Only Professional 1 is supported.

    Professional 1

    AZ

    An availability zone (AZ) is a geographic location with independent power supply and network facilities in a region. AZs in the same VPC are interconnected through private networks and are physically isolated.

    • If two or more AZs are available, select two AZs.

      The VPN gateway deployed in two AZs has higher availability. You are advised to select the AZs where resources in the VPC are located.

    • If only one AZ is available, select this AZ.

    AZ1, AZ2

    Connections

    Ten VPN connections are included free of charge with the purchase of a VPN gateway. You can select or customize the number of required VPN connections.

    NOTE:

    If you set the number of VPN connections to 10, all the 10 connections are free of charge.

    10

    Shared Bandwidth

    When Billing Mode is set to Yearly/Monthly, the shared bandwidth is enabled by default. When shared bandwidth is used, you can only use EIPs created now.

    Enabled

    EIP Type

    Select the type of the EIP to be bound to the VPN gateway.

    Dynamic BGP: Dynamic BGP provides automatic failover and chooses the optimal path when a network connection fails.

    Static BGP: Static BGP offers more routing control and protects against route flapping, but does not select an optimal path in real time when a network connection fails.

    For more information about EIP types, see What Is Elastic IP?.

    Dynamic BGP

    Bandwidth Name

    Specify the name of the EIP bandwidth.

    When Shared Bandwidth is toggled on, you can select the name of the shared bandwidth.

    p2c-vpngw-bandwidth1

    EIP

    Set the EIP used by the VPN gateway to communicate with clients.

    • Create now: Buy a new EIP. The billing mode of a new EIP is yearly/monthly.
    • Use existing: Use an existing EIP.
      NOTE:

      If an existing EIP is used, its billing mode can be pay-per-use or yearly/monthly.

    Create now

    Advanced Settings > Tags

    • A tag identifies a VPN resource. It consists of a key and a value. A maximum of 20 tags can be added.
    • You can select predefined tags or customize tags.
    • To view predefined tags, click View predefined tags.

    -

    Usage Duration

    If your account balance is sufficient and you select Auto-renew, the system automatically renews your service when the required duration elapses.

    • Monthly subscription: Your service is automatically renewed on a per-month basis.
    • Yearly subscription: Your service is automatically renewed on a per-year basis.

    6

  7. Confirm the VPN gateway information, click Pay Now, and complete the payment.

    If the VPN gateway fails to be created, you can view the failure information in the upper right corner of the VPN gateway list.