All Products
Search
Document Center

Elastic Desktop Service:Private access to a cloud computer via IPsec-VPN

Last Updated:Apr 08, 2026

IPsec-VPN is a routing-based network connection technology. After you deploy an IPsec-VPN connection, local clients can connect to services that are deployed in a Virtual Private Cloud (VPC). This topic describes how to use IPsec-VPN to connect a local client to the VPC of an Elastic Desktop Service (EDS) Enterprise office network, which allows the client to access cloud computers over a private network.

Prerequisites

Before you begin, read Overview of private connections to cloud computers and complete the following prerequisites.

  • Create a Cloud Enterprise Network (CEN) instance. For details, see Create a CEN instance.

  • Create a Virtual Private Cloud (VPC) instance and add the VPC instance to a Cloud Enterprise Network. For more information, see Create a VPC and a vSwitch or Quickly add a network instance to a CEN.

  • Create an office network, and add its VPC to Cloud Enterprise Network. For more information, see Create and manage an office network that uses a convenience account or Create and manage an office network that uses an enterprise AD account.

    Important
    • To prevent IP address conflicts among the new office network, existing networks in Cloud Enterprise Network, and your on-premises data center, plan your IPv4 CIDR blocks before you create the office network. For details, see Plan CIDR blocks.

    • If you already have a convenient office network, you need to add it to the Cloud Enterprise Network.

    • If AD is deployed on an Elastic Compute Service (ECS) instance, you must add the VPC that contains the AD server to a Cloud Enterprise Network. If AD is deployed on an on-premises server, you must first establish a connection between your on-premises network and the cloud to successfully integrate with AD. You can first create an AD office network, and then complete the AD domain configuration after the network connection is established.

Sample CIDR blocks

During the preparation phase, you need to plan the CIDR blocks for your on-premises devices and cloud network instances to avoid conflicts. This topic uses the following sample CIDR blocks. In practice, use your actual values.

Item

CIDR block

Description

Office network VPC

172.16.0.0/12

The PrivateLink service endpoint is in this CIDR block.

User VPC

192.168.0.0/16

A VPC that you create to establish the VPN connection.

On-premises data center

10.0.0.0/24

The Alibaba Cloud Workspace client connects from this CIDR block.

On-premises data center gateway device

115.XX.XX.154

The public IP address of the on-premises data center gateway device.

Note

Your on-premises data center gateway device must support standard IKEv1 and IKEv2 protocols to connect to an Alibaba Cloud VPN gateway. Contact your gateway device vendor to confirm protocol support.

Step 1: Configure the IPsec-VPN connection

  1. Purchase a VPN gateway and enable the IPsec-VPN feature. For details, see Create a VPN gateway.

    Configuration details

    Parameter

    Description

    Instance name

    Enter a name for the VPN gateway.

    Resource group

    Select a resource group for the VPN gateway.

    If you do not select a resource group, the VPN gateway is added to the default resource group after it is created. You can manage the resource groups of VPN gateways and other cloud resources on the Resource Management console. For more information, see What is Resource Management?

    Region and Zone

    The region where you want to create the VPN gateway.

    The VPN gateway must be in the same region as the VPC you associate it with.

    Gateway type

    The type of the VPN gateway.

    Network type

    The network type of the VPN gateway.

    • Public: The VPN gateway establishes a VPN connection over the internet.

    • Private: The VPN gateway establishes a VPN connection over a private network.

    Note

    If you need to establish a VPN connection over a private network, we recommend that you use a private IPsec-VPN connection bound to a transit router. For more information, see Encrypt data transmission over a private network by using BGP dynamic routing.

    Tunnels

    The system displays the tunnel mode supported for IPsec-VPN connections in the current region.

    • Single-tunnel

    • Dual-tunnel

    For more information about IPsec-VPN connection tunnel modes, see Associate an IPsec-VPN connection with a VPN gateway.

    VPC

    Select the VPC to associate with the VPN gateway.

    vSwitch 1

    Select a vSwitch from the VPC.

    • If the tunnel mode of the IPsec-VPN connection is single-tunnel, you need to specify only one vSwitch.

    • If the tunnel mode of the IPsec-VPN connection is dual-tunnel, you need to specify two vSwitches.

      After the IPsec-VPN feature is enabled, the system creates an elastic network interface (ENI) in each of the two vSwitches. These ENIs handle traffic exchange between the IPsec-VPN connection and the VPC. Each ENI occupies an IP address from its vSwitch.

    Note
    • By default, the system selects the first vSwitch for you. You can change it or use the default one.

    • You cannot change the vSwitches associated with the VPN gateway after it is created. The details page of the VPN gateway displays the associated vSwitches, the zones where they reside, and the ENIs in the vSwitches.

    vSwitch 2

    If the tunnel mode of the IPsec-VPN connection is dual-tunnel, select a second vSwitch from the VPC.

    • For zone-disaster recovery, specify two vSwitches from different zones within the VPC associated with the VPN gateway.

    • For regions with only one zone, zone-disaster recovery is not supported. We recommend specifying two different vSwitches in the same zone for high availability of the IPsec-VPN connection. You can also select the same vSwitch twice.

    Peak Bandwidth

    Select the maximum bandwidth of the VPN gateway. Unit: Mbit/s.

    IPsec-VPN

    Enable or disable the IPsec-VPN feature. The default value is Enable.

    Enable this feature to establish an IPsec-VPN connection.

    SSL-VPN

    Enable or disable the SSL-VPN feature. The default value is Disable.

    You do not need to enable this feature to establish an IPsec-VPN connection.

    Select a subscription duration.

    Service-linked role

    Click Create service-linked role to automatically create the AliyunServiceRoleForVpn service-linked role.

    The VPN gateway uses this role to access resources in other cloud services. For more information, see AliyunServiceRoleForVpn.

    If this parameter is displayed as Created, the role already exists and no action is required.

  2. Create a customer gateway. For details, see Create and manage a customer gateway.

    Configuration details

    Parameter

    Description

    Name

    Enter a name for the customer gateway.

    IP address

    Enter the static IP address of the on-premises gateway device.

    • If you plan to create a public IPsec-VPN connection, enter a public IP address.

    • If you plan to create a private IPsec-VPN connection, enter a private IP address.

    The following IP addresses cannot be used, or the IPsec-VPN connection cannot be established:

    • 100.64.0.0 to 100.127.255.255

    • 127.0.0.0 to 127.255.255.255

    • 169.254.0.0 to 169.254.255.255

    • 224.0.0.0 to 239.255.255.255

    • 255.0.0.0 to 255.255.255.255

    Autonomous System Number (ASN)

    If you plan to enable Border Gateway Protocol (BGP) for the IPsec-VPN connection, you need to configure the Autonomous System Number (ASN) of the on-premises gateway device. The valid value range is 1 to 4294967295. 45104 cannot be used.

    You can enter the ASN in two segments separated by a period (.). Each segment is in decimal format.

    For example, if you enter 123.456, the ASN is calculated as: 123 * 65536 + 456 = 8061384.

    Note
    • We recommend using a private ASN to establish a BGP connection with Alibaba Cloud. Refer to relevant documentation for the private ASN ranges.

    • 45104 is the unique identifier assigned to Alibaba Cloud by the Internet Assigned Numbers Authority (IANA) for global internet routing and data transmission.

    Description

    Enter a description for the customer gateway.

    Resource group

    Select a resource group for the customer gateway.

    You can manage the resource groups of customer gateways and other cloud resources on the Resource Management console. For more information, see What is Resource Management?

    Tags

    You can add tags to customer gateways to mark and classify them, which helps in searching and aggregating resources. For more information, see What are tags?

    • Tag key: Add a tag key for the customer gateway. You can select an existing key or enter a new one.

    • Tag value: Add a tag value for the customer gateway. You can select an existing value or enter a new one. The tag value can be empty.

  3. Create an IPsec-VPN connection. For details, see Create an IPsec-VPN connection.

    Configuration details

    Parameter

    Description

    Name

    Enter a name for the IPsec-VPN connection.

    Region

    Select the region of the VPN gateway that you want to associate with the IPsec-VPN connection.

    After the IPsec-VPN connection is created, its region is the same as the region of the VPN gateway.

    Resource group

    Select the resource group of the VPN gateway.

    If you do not select a resource group, the system displays VPN gateways from all resource groups.

    Bind VPN gateway

    Select the VPN gateway to associate with the IPsec-VPN connection.

    Routing mode

    Select the routing mode for the IPsec-VPN connection.

    • Destination Routing Mode (Default): Routes and forwards traffic based on the destination IP address.

    • Protected Data Flows: Routes and forwards traffic based on both the source and destination IP addresses.

      If you select Protected Data Flows, you must configure Local network and Remote network. After the IPsec-VPN connection is configured, the system automatically adds a policy-based route to the policy-based route table of the VPN gateway.

      By default, the route is not published. You can decide whether to publish the route to the route table of the VPC based on your network communication needs. For more information, see Configure a policy-based route.

    Note

    If the IPsec-VPN connection is associated with an earlier version of a VPN gateway, you do not need to select a routing mode.

    Local network

    If you set Routing mode to Protected Data Flows, enter the CIDR block on the VPC side that needs to communicate with the on-premises data center. During phase-2 negotiation, the protected data flows on both sides are negotiated. We recommend that the specified Local network matches the remote network on the on-premises data center side.

    Click the add icon next to the text box to add multiple CIDR blocks on the VPC side.

    Note

    If you configure multiple CIDR blocks, you must set the IKE version to IKEv2.

    Remote network

    If you set Routing mode to Protected Data Flows, enter the CIDR block on the on-premises data center side that needs to communicate with the VPC. During phase-2 negotiation, the protected data flows on both sides are negotiated. We recommend that the specified Remote network matches the local network on the on-premises data center side.

    Click the add icon next to the text box to add multiple CIDR blocks on the on-premises data center side.

    Note

    If you configure multiple CIDR blocks, you must set the IKE version to IKEv2.

    Effective immediately

    Specifies whether the configuration takes effect immediately.

    • Yes (Default): The system initiates IPsec negotiation immediately after the configuration is complete.

    • No: The system initiates IPsec negotiation only when traffic is detected.

    Customer gateway

    Select the customer gateway to associate with the IPsec-VPN connection.

    Pre-shared key

    Enter the authentication key for the IPsec-VPN connection, which is used for identity verification between the VPN gateway and the on-premises data center.

    • The key can be 1 to 100 characters long and can include digits, uppercase and lowercase letters, and the following special characters: ~`!@#$%^&*()_-+={}[]\|;:',.<>/?. It cannot contain spaces.

    • If you do not specify a pre-shared key, the system generates a random 16-character string. After creating the IPsec-VPN connection, you can view the system-generated key by clicking Edit. For more information, see IPsec-VPN connections (bound to a VPN gateway).

    Important

    The pre-shared key must be identical on both sides of the IPsec-VPN connection, or the connection will fail.

    Enable BGP

    If the IPsec-VPN connection needs to use BGP, enable this switch. BGP is disabled by default.

    Before using BGP dynamic routing, we recommend that you understand its working mechanism and limitations. For more information, see Configure BGP dynamic routing.

    Local ASN

    Enter the ASN for the Alibaba Cloud side of the IPsec-VPN connection. The default value is 45104. The valid value range is 1 to 4294967295.

    You can enter the ASN in two segments separated by a period (.). Each segment is in decimal format.

    For example, if you enter 123.456, the ASN is calculated as: 123 * 65536 + 456 = 8061384.

    Note

    We recommend using a private ASN to establish a BGP connection with Alibaba Cloud. Refer to relevant documentation for the private ASN ranges.

  4. Publish the remote network CIDR block to Cloud Enterprise Network.

    1. Log on to the VPC console.

    2. In the left-side navigation pane, click Route Tables.

    3. In the list of route tables, find the route table corresponding to the user VPC and click its ID.

    4. On the Route Entry List tab, click the Custom Route tab.

    5. Find the configured remote network CIDR block (the private CIDR block of your on-premises data center) and click Publish in the Actions column.

      The route is published when its Status in CEN column changes to Published.

Step 2: Load the VPN configuration on the gateway

  1. Log on to the VPC console.

  2. In the left-side navigation pane, choose Interconnections > VPN > IPsec Connections.

  3. In the top navigation bar, select the region of the IPsec-VPN connection.

  4. On the IPsec Connections page, find the target IPsec-VPN connection and click Generate Peer Configuration in the Actions column.

  5. Load the downloaded configuration onto your on-premises gateway device.

Step 3: Configure VPC address or cloud service routes

You can choose one of the following solutions. Solutions 1 and 2 both involve configuring an Alibaba Cloud VPC address. The difference is that Solution 1 uses a default address, which is simpler for end users as it does not require configuring a custom address.

VPC address (default)

  1. Obtain the private gateway address of the office network.

  2. On your enterprise DNS service, configure a CNAME record to point private.wuying.com to the private gateway address of the office network.

  3. The end user completes the network connection configuration on the Alibaba Cloud Workspace client.

    1. Open the Windows client.

    2. In the upper-right corner of the logon screen, click the icon and select Connection Configuration.

    3. In the Connection Configuration dialog box, set the following options:

      Important

      This feature requires Windows client version 7.7 or later. Earlier versions do not support configuring an Alibaba Cloud VPC address.

      • Connection Type: Select Alibaba Cloud VPC.

      • Alibaba Cloud VPC Address: Select Default Address.

    4. Click Confirm.

VPC address (custom)

  1. Obtain the private gateway address of the office network and provide it to your end users.

    1. Log on to the Elastic Desktop Service Enterprise console.

    2. In the left-side navigation pane, choose Networks & Storage > Office Network.

    3. On the Office Network page, click the target office network ID.

    4. In the Network Information section of the office network details page, copy the Private Gateway Address. You will use this address in a later step.

  2. The end user completes the network connection configuration on the Alibaba Cloud Workspace client.

    1. Open the Windows client.

    2. In the upper-right corner of the logon screen, click the icon and select Connection Configuration.

    3. In the Connection Configuration dialog box, set the following options:

      Important

      This feature requires Windows client version 7.7 or later. Earlier versions do not support configuring an Alibaba Cloud VPC address.

      • Connection Type: Select Alibaba Cloud VPC.

      • Alibaba Cloud VPC Address: Select Custom Address.

      • Custom Address: Enter the private gateway address of the office network provided by the administrator.

    4. Click Confirm.

Cloud routes and DNS

  1. Configure cloud service routes.

    The network segment for private cloud services on Alibaba Cloud is 100.64.0.0/10, which is a reserved network segment as specified in RFC 6598. To allow the Alibaba Cloud Workspace client to call the service APIs of Elastic Desktop Service (EDS) Enterprise, you must add the 100.64.0.0/10 network segment as a local address in your VPN to forward requests destined for this segment to your VPC on the cloud.

    Note
    • If your 100.x.x.x network range has a conflict, use Solution 1 or Solution 2.

    • If you use cloud computers in multiple regions, you can set the 100.64.0.0/10 address block as the network segment for cloud services. If you need a more granular network, you can refer to Cloud computer service port requirements to set the cloud service network segment. In this case, the IP addresses of the domain names for the private network management service are the cloud service IP addresses.

  2. (Optional) Before you configure DNS, you can run the following command to test if the domain name can be resolved correctly.

    nslookup ecd-vpc.cn-hangzhou.aliyuncs.com

    If an IP address is returned, the domain name can be resolved correctly, and you can skip step 3. If no IP address is returned, you need to configure DNS as described in the next step.

  3. (Optional) Configure DNS.

    To access cloud computers over an enterprise network, DNS is required to resolve the domain names of the APIs and streaming gateways of the Elastic Desktop Service (EDS) Enterprise service within the private network. The corresponding DNS addresses are:

    • 100.100.2.136

    • 100.100.2.138

    You can use one of the following configuration methods:

    • Configure the two DNS addresses on the DHCP service of your on-premises data center.

    • On the DNS server in your local IDC, configure zone forwarding to forward domain name resolution requests that end with aliyuncs.com to 100.100.2.136 or 100.100.2.138.

Step 4: Verify the private connection

Note

The following example uses Windows client version 7.7 to verify the private connection to a cloud computer. In practice, select the appropriate client based on your situation.

  1. Open the Windows client.

  2. In the upper-right corner of the logon screen, click the icon and select Connection Configuration.

  3. In the Connection Configuration dialog box, set Connection Type to Alibaba Cloud VPC.

  4. On the logon screen, enter the credentials you received in the cloud computer assignment notification email (including the office network ID or organization ID, username, and password), and click the next icon.

  5. In the cloud resource list on the client, find your cloud computer, and then start and connect to it.

    Note

    A network request timeout error indicates a network disconnection. Check your configuration. After correcting it, log on to the client and connect to the cloud computer again.