All Products
Search
Document Center

VPN Gateway:ModifySslVpnServer

Last Updated:Mar 24, 2025

Modifies the configurations of an SSL server.

Operation description

  • To enable two-factor authentication for an SSL server, make sure that the VPN gateway supports two-factor authentication. You may need to upgrade the VPN gateway. For more information, see Two-factor authentication supports IDaaS EIAM 2.0.

  • If you modify only Name, this operation is synchronous. If you modify other parameters besides Name, this operation is asynchronous.

  • ModifySslVpnServer is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeVpnGateway operation to query the status of the task.

    • If the VPN gateway is in the updating state, the SSL server is being modified.
    • If the VPN gateway is in the active state, the SSL server is modified.
  • You cannot repeatedly call ModifySslVpnServer within the specified period of time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:ModifySslVpnServerupdate
*SslVpnServer
acs:vpc:{#regionId}:{#accountId}:sslvpnserver/{#SslVpnServerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID is different for each request.
02fb3da4-130e-11e9-8e44-0016e04115b
RegionIdstringYes

The region ID of the VPN gateway.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
SslVpnServerIdstringYes

The ID of the SSL server.

vss-bp18q7hzj6largv4v****
NamestringNo

The name of the SSL server.

The name must be 1 to 100 characters in length and cannot start with http:// or https://.

test
ClientIpPoolstringNo

The client CIDR block.

The CIDR block from which an IP address is allocated to the virtual network interface controller (NIC) of the client, rather than the private CIDR block.

If the client accesses the SSL server over an SSL-VPN connection, the VPN gateway assigns an IP address from the specified client CIDR block for the client to access cloud resources.

Make sure that the number of IP addresses in the client CIDR block is at least four times the maximum number of SSL-VPN connections supported by the VPN gateway.

Click to view the reason.

For example, if you specify 192.168.0.0/24 as the client CIDR block, the system first divides a subnet CIDR block with a subnet mask of 30 from 192.168.0.0/24, such as 192.168.0.4/30. This subnet provides up to four IP addresses. Then, the system allocates an IP address from 192.168.0.4/30 to the client and uses the other three IP addresses to ensure network communication. In this case, one client consumes four IP addresses. Therefore, to ensure that an IP address is assigned to your client, the number of IP addresses in the client CIDR block must be at least four times the maximum number of SSL-VPN connections supported by the VPN gateway with which the SSL server is associated.

Click to view the CIDR blocks that are not supported.
  • 100.64.0.0~100.127.255.255
  • 127.0.0.0~127.255.255.255
  • 169.254.0.0~169.254.255.255
  • 224.0.0.0~239.255.255.255
  • 255.0.0.0~255.255.255.255
Click to view the recommended client CIDR blocks for different numbers of SSL-VPN connections.
  • If the number of SSL-VPN connections is 5, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 27 bits in length. Examples: 10.0.0.0/27 and 10.0.0.0/26.
  • If the number of SSL-VPN connections is 10, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 26 bits in length. Examples: 10.0.0.0/26 and 10.0.0.0/25.
  • If the number of SSL-VPN connections is 20, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 25 bits in length. Examples: 10.0.0.0/25 and 10.0.0.0/24.
  • If the number of SSL-VPN connections is 50, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 24 bits in length. Examples: 10.0.0.0/24 and 10.0.0.0/23.
  • If the number of SSL-VPN connections is 100, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 23 bits in length. Examples: 10.0.0.0/23 and 10.0.0.0/22.
  • If the number of SSL-VPN connections is 200, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 22 bits in length. Examples: 10.0.0.0/22 and 10.0.0.0/21.
  • If the number of SSL-VPN connections is 500, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 21 bits in length. Examples: 10.0.0.0/21 and 10.0.0.0/20.
  • If the number of SSL-VPN connections is 1,000, we recommend that you specify a client CIDR block with a subnet mask that is less than or equal to 20 bits in length. Examples: 10.0.0.0/20 and 10.0.0.0/19.
Note
  • The subnet mask of the client CIDR block must be 16 to 29 bits in length.
  • Make sure that the client CIDR block does not overlap with the local CIDR block, the VPC CIDR block, or route CIDR blocks associated with the client.
  • We recommend that you use 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, or one of their subnets as the client CIDR block. If you want to specify a public CIDR block as the client CIDR block, you must specify the public CIDR block as the user CIDR block of the virtual private cloud (VPC). This way, the VPC can access the public CIDR block. For more information, see VPC FAQs.
  • After you create an SSL server, the system automatically adds routes that point to the client CIDR block to the VPC route table. Do not manually add routes that point to the client CIDR block. Otherwise, SSL-VPN connections cannot work as expected.
  • 10.30.30.0/24
    LocalSubnetstringNo

    The local CIDR block.

    The CIDR block that your client needs to access by using the SSL-VPN connection.

    This value can be the CIDR block of a VPC, a vSwitch, a data center that is connected to a VPC by using an Express Connect circuit, or an Alibaba Cloud service such as Object Storage Service (OSS).

    The subnet mask of the specified local CIDR block must be 8 to 32 bits in length. You cannot specify the following CIDR blocks as the local CIDR blocks:

    • 127.0.0.0~127.255.255.255
    • 169.254.0.0~169.254.255.255
    • 224.0.0.0~239.255.255.255
    • 255.0.0.0~255.255.255.255
    10.20.20.0/24
    ProtostringNo

    The protocol that is used by the SSL server. Valid values:

    • TCP (default)
    • UDP
    UDP
    CipherstringNo

    The encryption algorithm that is used in the SSL-VPN connection. Valid values:

    • AES-128-CBC (default)
    • AES-192-CBC
    • AES-256-CBC
    • none
    AES-128-CBC
    PortintegerNo

    The port that is used by the SSL server. Valid values of port numbers: 1 to 65535. Default value: 1194.

    The following ports are not supported: 22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, and 4500.

    1194
    CompressbooleanNo

    Specifies whether to enable data compression. Valid values:

    • true (default)
    • false
    true
    EnableMultiFactorAuthbooleanNo

    Specifies whether to enable two-factor authentication. To enable two-factor authentication, you need to specify IDaaSInstanceId, IDaaSRegionId, and IDaaSApplicationId. Valid values:

    • true: enables the feature.
    • false: disables the feature.
    Note
  • If you use two-factor authentication for the first time, you must first complete authorization .
  • When you create an SSL server in the UAE (Dubai) region, we recommend that you associate the SSL server with an IDaaS EIAM 2.0 instance in Singapore to reduce latency.
  • IDaaS EIAM 1.0 instances are no longer available for purchase. If your Alibaba Cloud account has IDaaS EIAM 1.0 instances, the IDaaS EIAM 1.0 instances can be associated after two-factor authentication is enabled. If your Alibaba Cloud account does not have IDaaS EIAM 1.0 instances, only IDaaS EIAM 2.0 instances can be associated after two-factor authentication is enabled.
  • false
    IDaaSInstanceIdstringNo

    The ID of the IDaaS EIAM instance.

    idaas-cn-hangzhou-****
    IDaaSRegionIdstringNo

    The region ID of the IDaaS EIAM instance.

    cn-hangzhou
    IDaaSApplicationIdstringNo

    The ID of the IDaaS application.

    • If an IDaaS EIAM 2.0 instance is associated, you need to specify an IDaaS application ID.
    • If an IDaaS EIAM 1.0 instance is associated, you do not need to specify an IDaaS application ID.
    app_my6g4qmvnwxzj2f****

    Response parameters

    ParameterTypeDescriptionExample
    object

    The results returned.

    InternetIpstring

    The public IP address.

    47.98.XX.XX
    IDaaSInstanceIdstring

    The ID of the IDaaS EIAM instance.

    idaas-cn-hangzhou-****
    CreateTimelong

    The time when the SSL server was created.

    1492753580000
    VpnGatewayIdstring

    The ID of the VPN gateway.

    vpn-bp1q8bgx4xnkm2ogj****
    Compressboolean

    Indicates whether data compression is enabled.

    false
    Portinteger

    The port that is used by the SSL server.

    1194
    LocalSubnetstring

    The local CIDR block.

    10.20.20.0/24
    RegionIdstring

    The ID of the region where the SSL server is created.

    cn-hangzhou
    Cipherstring

    The encryption algorithm.

    AES-128-CBC
    RequestIdstring

    The request ID.

    DF11D6F6-E35A-41C3-9B20-6FC8A901FE65
    Connectionsinteger

    The total number of current connections.

    0
    SslVpnServerIdstring

    The ID of the SSL server.

    vss-bp18q7hzj6largv4v****
    MaxConnectionsinteger

    The maximum number of connections.

    5
    Namestring

    The name of the SSL server.

    test
    EnableMultiFactorAuthboolean

    Indicates whether two-factor authentication is enabled.

    • true
    • false (default)
    false
    ClientIpPoolstring

    The client CIDR block.

    10.30.30.0/24
    Protostring

    The protocol that is used by the SSL server.

    UDP
    ResourceGroupIdstring

    The ID of the resource group to which the SSL server belongs.

    The SSL server and the VPN gateway associated with the SSL server belong to the same resource group. You can call the ListResourceGroups operation to query resource groups.

    rg-acfmzs372yg****
    IDaaSApplicationIdstring

    The ID of the IDaaS application.

    app_my6g4qmvnwxzj2f****
    IDaaSInstanceVersionstring

    The version of the IDaaS EIAM instance.

    • This parameter is returned only if the SSL server is associated with an IDaaS EIAM 2.0 instance. Only EIAM 2.0 is returned.
    • If the SSL server is associated with an IDaaS EIAM 1.0 instance, no value is returned.
    EIAM 2.0

    Examples

    Sample success responses

    JSONformat

    {
      "InternetIp": "47.98.XX.XX",
      "IDaaSInstanceId": "idaas-cn-hangzhou-****",
      "CreateTime": 1492753580000,
      "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj****",
      "Compress": false,
      "Port": 1194,
      "LocalSubnet": "10.20.20.0/24",
      "RegionId": "cn-hangzhou",
      "Cipher": "AES-128-CBC",
      "RequestId": "DF11D6F6-E35A-41C3-9B20-6FC8A901FE65",
      "Connections": 0,
      "SslVpnServerId": "vss-bp18q7hzj6largv4v****",
      "MaxConnections": 5,
      "Name": "test",
      "EnableMultiFactorAuth": false,
      "ClientIpPool": "10.30.30.0/24",
      "Proto": "UDP",
      "ResourceGroupId": "rg-acfmzs372yg****",
      "IDaaSApplicationId": "app_my6g4qmvnwxzj2f****",
      "IDaaSInstanceVersion": "EIAM 2.0"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400InvalidNameThe name is not validThe name format is invalid.
    400VpnGateway.ConfiguringThe specified service is configuring.The service is being configured. Try again later.
    400VpnGateway.FinancialLockedThe specified service is financial locked.The service is suspended due to overdue payments. Top up your account first.
    400IpConflictClient IP pool conflict with local IP range.The client IP pool conflicts with the local IP range.
    400IpConflictClient IP pool conflict with other SSL VPN server in the same VPC.The client IP address pool conflicts with SSL servers in the same VPC.
    400SslVpnServer.AddRouteErrorAdd route error whose destination is client IP pool, please check vpc route entry and relevant quota.The system failed to add the route that points to the client CIDR block. View the VPC route and quota.
    400ClientIpPool.NetmaskInvalidThe netmask length of client IP pool must be greater than or equal to 16 and less than or equal to 29.The subnet mask of the client IP pool must range from 16 to 29.
    400ClientIpPool.SubnetInvalidThe specified client IP pool cannot be used.The client CIDR block is unavailable.
    400MissingParameter.IDaaSInstanceIdThe input parameter IDaaSInstanceId is mandatory when enable multi-factor authentication.You must set the IDaaSInstanceId parameter when you enable two-factor authentication.
    400OperationFailed.GetIDaaSInfoFailed to get secret key from your IDaaS instance.-
    400OperationFailed.NoRamPermissionVpn Service has no permission to operate your IDaaS instances.The VPN service does not have the permissions to manage your IDaaS instance.
    400OperationUnsupported.NotSupportMultiFactorAuthCurrent version of the VPN does not support multi-factor authentication.-
    400SystemBusyThe system is busy. Please try again later.The system is busy. Please try again later.
    400SslVpnServerPort.IllegalThe server port is not in the range of [1-65535].The port of the SSL-VPN server must be from 1 to 65535.
    400EnableHaCheck.SslVpnServerClientCidrContainsVpcRouteDestSsl vpn client cidr contains vpc route prefix. The vpc route prefix is %s.The prefix %s in the VPC route table falls within the CIDR block of the SSL client.
    400InvalidInstanceId.NotFoundInstanceId is not found.The Express Connect circuit ID is invalid.
    400VpnRouteEntry.ConflictThe specified route entry has conflict.Route conflicts exist.
    400IllegalParam.IDaaSApplicationIdThe specified IDaaS application Id is not illegal, the application instance needs to be created based on the dedicated SSL VPN template.The specified IDaaS application instance ID is invalid. The application instance must be created based on the dedicated SSL VPN template.
    400MissingParam.IDaaSApplicationIdThe input parameter IDaaSApplicationId is mandatory when enable multi-factor authentication.Enter the IDaaSApplicationId parameters when starting two-factor authentication.
    400SslVpnIDaaS2.NotSupportCurrent version of the VPN does not support IDaaS2.0.The current version of the VPN instance does not support IDaaS2.0.
    400MissingParam.IDaaSRegionIdThe input parameter IDaaSRegionId is mandatory when enable multi-factor authentication.Enter the IDaaSRegionId parameters when starting two-factor authentication.
    403Forbbiden.SubUserUser not authorized to operate on the specified resource as your account is created by another user.You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.
    403ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
    404InvalidRegionId.NotFoundThe specified region is not found during access authentication.The specified area is not found during authentication.
    404InvalidIDaaSInstanceId.NotFoundThe specified IDaaS instance ID does not exist.The specified IDaaS instance does not exist.
    404InvalidIDaaSApplicationId.NotFoundThe specified IDaaS application Id does not exist.The ID of the specified IDaaS application instance does not exist.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-05-10The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
    2024-01-04The Error code has changedView Change Details
    2023-10-19API Description Update. The API operation is not deprecated.. The Error code has changed. The response structure of the API has changedView Change Details
    2023-05-30The Error code has changedView Change Details