To use the native VPN client on an iOS device to connect to Alibaba Cloud through IPsec-VPN, create an IPsec-VPN server that controls which networks and resources the device can access.
Prerequisites
-
You have reviewed the Limitations and Requirements for IPsec-VPN servers.
-
A VPN gateway instance with SSL-VPN enabled has been created. Create and manage a VPN gateway instance.
Create an IPsec-VPN server
Log on to the VPN Gateway console.
In the left navigation pane, choose .
-
In the top navigation bar, select the region where you want to deploy the IPsec-VPN server.
-
On the IPsec-VPN Server page, click Create IPsec-VPN Server.
-
On the Create IPsec-VPN Server page, set the following parameters and click OK.
Parameter
Description
Name
Enter a name for the IPsec-VPN server.
Resource Group
Select the resource group of the VPN gateway instance.
The IPsec-VPN server must belong to the same resource group as the associated VPN gateway.
VPN Gateway
Select the VPN gateway instance to associate with the IPsec-VPN server.
NoteThe associated VPN gateway cannot be changed after the IPsec-VPN server is created.
Local Network
Enter the CIDR blocks that clients can access through the IPsec-VPN server.
The local network can be the CIDR block of a VPC, a vSwitch, or an on-premises data center connected to the VPC through an Express Connect circuit.
Click Add Local CIDR Block to add multiple CIDR blocks.
Client CIDR Block
The CIDR block from which IP addresses are assigned to the client virtual network interface. This is not the client's existing private CIDR block. When a client connects to the local network through the IPsec-VPN server, the VPN gateway assigns an IP address from this block to the client.
The following CIDR blocks are not supported:
Important-
Make sure that the client CIDR block does not overlap with the local network or any CIDR blocks in the VPC.
-
The client CIDR block must contain at least four times the maximum concurrent connections supported by the VPN gateway.
For example, with a client CIDR block of 192.168.0.0/24, the system allocates a /30 subnet (such as 192.168.0.4/30) per connection — one IP for the client and three reserved for the system. Each connection consumes four IP addresses.
Pre-Shared Key
Enter the pre-shared key for authentication between the server and client. The key must be 1 to 100 characters in length.
If you do not specify a pre-shared key, the system generates a random 16-character string. After creation, view the generated key by clicking Edit. Modify an IPsec-VPN server.
ImportantThe client's pre-shared key must match the IPsec-VPN server's key. Mismatched keys prevent connection.
Effective Immediately
Whether to start negotiation immediately.
-
Yes: Negotiation starts immediately after the configuration is complete.
-
No: Negotiation starts when inbound traffic is detected.
Advanced Configuration: IKE Configurations
Version
The IKE protocol version.
-
ikev1
-
ikev2
Both IKEv1 and IKEv2 are supported. IKEv2 simplifies negotiation and better supports multi-network scenarios. IKEv2 is recommended.
Local ID
The server identifier. Defaults to the VPN gateway's public IP address. In single-tunnel mode, the public IP address is used.
Supports FQDN and IP address formats. The Local ID must match the Remote ID of the peer IPsec client.
IP address format is recommended.
Remote ID
The client identifier. Supports FQDN and IP address formats. Must match the Local ID of the peer IPsec client. IP address format is recommended.
-
Modify an IPsec-VPN server
Log on to the VPN Gateway console.
In the left navigation pane, choose .
In the top navigation bar, select the region of the IPsec server.
-
On the IPsec-VPN Server page, find the IPsec-VPN server that you want to modify, and then click Edit in the Actions column.
-
On the Edit IPsec-VPN Server page, modify the parameters and click OK.
Parameter descriptions are in Create an IPsec-VPN server.
Delete an IPsec-VPN server
Deleting an IPsec-VPN server immediately terminates all active client connections.
Log on to the VPN Gateway console.
In the left navigation pane, choose .
In the top navigation bar, select the region of the IPsec server.
-
On the IPsec-VPN Server page, find the IPsec-VPN server that you want to delete, and then click Delete in the Actions column.
-
In the Delete IPsec-VPN Server dialog box, confirm the information and click OK.
Manage IPsec-VPN servers by API
You can use tools such as Alibaba Cloud SDKs (recommended), Alibaba Cloud CLI, Terraform, and Resource Orchestration Service (ROS) to manage IPsec-VPN servers through API operations: