To connect your on-premises data center or private network to your ECSs in a VPC, you need to create VPN connections after creating a VPN gateway and a customer gateway.
in the upper left corner and select the desired region and project.
in the upper left corner, and choose .A VPN gateway can establish two VPN connections with a customer gateway using EIPs, improving reliability.
Table 1 lists the VPN connection parameters.
Parameter | Description | Example Value |
|---|---|---|
Name | VPN connection name. The value can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | vpn-001 |
VPN Gateway | Name of the VPN gateway for which VPN connections are created. You can also click Create VPN Gateway to create a VPN gateway. For details about related parameters, see Table 2. | vpngw-001 |
VPN Gateway IP of Connection 1 |
The same address of a VPN gateway cannot be repeatedly selected when you create VPN connections between the VPN gateway and the same customer gateway. | 11.xx.xx.11 |
Customer Gateway of Connection 1 | Select the customer gateway of connection 1. You can also click Create Customer Gateway to create a customer gateway. For details about related parameters, see Table 1. NOTE: If a customer gateway connects to multiple VPN gateways, the BGP ASNs and VPN types of the VPN gateways must be the same. | cgw-001 |
VPN Gateway IP of Connection 2 |
The VPN gateway IP address must be unique for each connection with a customer gateway. | 11.xx.xx.12 |
Customer Gateway of Connection 2 | Select the customer gateway of connection 2. You can also click Create Customer Gateway to create a customer gateway. For details about related parameters, see Table 1. NOTE: If a customer gateway connects to multiple VPN gateways, the BGP ASNs and VPN types of the VPN gateways must be the same. | cgw-001 |
VPN Type | IPsec connection mode, which can be route-based or policy-based.
NOTE: By default, the VPN type, customer subnet, branch interconnection setting (BGP routing mode), and policy rules (policy-based mode) of the two connections are the same. | Static routing |
Customer Subnet | Customer-side subnet that needs to access the VPC on the cloud through VPN connections. If there are multiple customer subnets, separate them with commas (,). NOTE:
| 172.16.1.0/24,172.16.2.0/24 |
Branch Interconnection | This parameter is available only when VPN Type is set to BGP routing.
This function is disabled by default. When this function is disabled, only local subnet routes are advertised. | Disabled |
Policy | This parameter is available only when VPN Type is set to Policy-based. Defines the data flow that enters the encrypted VPN connections between the local and customer subnets. You need to configure the source and destination CIDR blocks in each policy rule. By default, a maximum of five policy rules can be configured.
|
|
Connection 1's Configuration | Configure the IP address assignment mode of tunnel interfaces, local tunnel interface address, customer tunnel interface address, link detection, health check, PSK, confirm PSK, policies, and advanced settings for connection 1. | Set parameters based on the site requirements. |
Interface IP Address Assignment | This parameter is available only when VPN Type is set to Static routing or BGP routing. NOTE:
| Automatically assign |
Local Tunnel Interface Address | This parameter is available only when Interface IP Address Assignment is set to Manually specify. Tunnel interface IP address of the VPN gateway. | N/A |
Customer Tunnel Interface Address | This parameter is available only when Interface IP Address Assignment is set to Manually specify. Tunnel interface IP address of the customer gateway device. | N/A |
Link Detection | This parameter is available only when VPN Type is set to Static routing. NOTE: When enabling this function, ensure that the customer gateway supports ICMP and is correctly configured with the customer interface IP address of the VPN connection. Otherwise, traffic will fail to be forwarded. After this function is enabled, the VPN gateway automatically performs Network Quality Analysis (NQA) on the customer interface IP address of the customer gateway. | Selected |
Health Check | The health check function is supported only when VPN Type is set to Static routing, BGP routing, or Policy-based. After health check is configured, the VPN gateway sends probe packets to the customer gateway to collect statistics about the round-trip time and packet loss rate of the physical link, which reflect the VPN connection quality. By default, health check is enabled. Enabling health check does not impact tunnel connectivity. | Enabled |
PSK | The PSKs configured for the VPN gateway and customer gateway must be the same. The PSK:
| Test@123 |
Confirm PSK | Enter the PSK again. | Test@123 |
Policy Settings | Custom | |
Tags |
| - |
Connection 2's Configuration | Determine whether to enable Same as that of connection 1.
| Enabled |
Parameter | Description | Example Value |
|---|---|---|
Version | Version of the IKE protocol. The value can be one of the following:
The default value is v2. | v2 |
Negotiation Mode | This parameter is available only when Version is v1.
| Main |
Authentication Algorithm | Hash algorithm used for authentication. The following options are available:
The default value is SHA2-256. | SHA2-256 |
Encryption Algorithm | Encryption algorithm. The following options are available:
The default value is AES-128. | AES-128 |
DH Algorithm | The following algorithms are supported:
The default value is Group 15. | Group 15 |
Lifetime (s) | Lifetime of a security association (SA). An SA will be renegotiated when its lifetime expires.
| 86400 |
Local ID | Authentication identifier of the VPN gateway used in IPsec negotiation. The peer ID configured on the customer gateway must be the same as the local ID configured here. Otherwise, IPsec negotiation fails.
| IP Address |
Customer ID | Authentication identifier of the customer gateway used in IPsec negotiation. The local ID configured on the customer gateway must be the same as the customer ID configured here. Otherwise, IPsec negotiation fails.
| IP Address |
Parameter | Description | Example Value |
|---|---|---|
Authentication Algorithm | Hash algorithm used for authentication. The following options are available:
The default value is SHA2-256. | SHA2-256 |
Encryption Algorithm | Encryption algorithm. The following options are available:
The default value is AES-128. | AES-128 |
PFS | Algorithm used by the Perfect forward secrecy (PFS) function. PFS supports the following algorithms:
The default value is DH group 15. | DH group 15 |
Transfer Protocol | Security protocol used in IPsec to transmit and encapsulate user data. The following protocol is supported: ESP The default value is ESP. | ESP |
Lifetime (s) | Lifetime of an SA. An SA will be renegotiated when its lifetime expires.
| 3600 |
An IKE policy specifies the encryption and authentication algorithms to use in the negotiation phase of an IPsec tunnel. An IPsec policy specifies the protocol, encryption algorithm, and authentication algorithm to use in the data transmission phase of an IPsec tunnel. The policy settings for VPN connections must be the same at the VPC and on-premises data center sides. If they are different, VPN negotiation will fail, causing the failure to establish VPN connections.
The following algorithms are not recommended because they are not secure enough:
Because some customer devices do not support secure encryption algorithms, the default encryption algorithm of VPN connections is still AES-128. You are advised to use a more secure encryption algorithm if customer devices support secure encryption algorithms.