Updated on 2025-07-03 GMT+08:00

Adding a Proxy Host to a Host Cluster

This section describes how to add a proxy host to a host cluster.

Prerequisites

  • A host cluster is available, and you have the permission to add hosts to the cluster.
  • A host bound with a public IP address is available.

Adding a Proxy Host

  1. Go to the Basic Resources page.
  2. Click the name of the desired cluster to go to the Target Hosts tab page.
  3. Click Add Host and select Adding IP for Add Hosts by.
  4. Select Proxy for Host Connection Mode to add a proxy host. Enter the following information and click OK.

    Table 1 Parameters of the proxy host (Linux)

    Parameter

    Mandatory

    Description

    Host Name

    Yes

    Enter a user-defined proxy host name.

    Enter 3 to 128 characters. Use digits, letters, hyphens (-), underscores (_), and periods (.).

    IP

    Yes

    Enter the public IP address bound to the proxy host. IPv4 or IPv6 address is supported.

    OS

    Yes

    The default value is the OS of the current host cluster and cannot be changed.

    Configure the target host by referring to Configuring a Linux Host to ensure successful connectivity verification.

    Authorization

    Yes

    Select a password or key for authentication as required.

    • If you select Password, the Username and Password are displayed. Take ECS as an example. Enter the ECS username and password.
    • If you select Key, the Username and Key are displayed. For details about how to generate and obtain a key, see Obtaining the Linux key.

    SSH Port

    Yes

    Port 22 is recommended. You may customize the port number.

    Install AOM ICAgent for metric monitoring, log query, and alarm functions on Huawei Cloud Linux hosts. Configure an agency before installation.

    No

    If the checkbox is selected, you can install and use AOM-ICAgent on your hosts for free for metric monitoring, log query, and alarm functions. ICAgent applies only to Huawei Cloud Linux hosts. Before installing ICAgent, configure an agency by referring to Creating an Agency.

    Table 2 Parameters of the proxy host (Windows)

    Parameter

    Mandatory

    Description

    Host Name

    Yes

    Enter a user-defined proxy host name.

    Enter 3 to 128 characters. Use digits, letters, hyphens (-), underscores (_), and periods (.).

    IP

    Yes

    Enter the public IP address bound to the proxy host. IPv4 or IPv6 address is supported.

    OS

    Yes

    The default value is the OS of the current host cluster and cannot be changed.

    Configure the target host by referring to Configuring the Host Running Windows to ensure successful connectivity verification.

    Authorization

    Yes

    Windows proxies support only password authentication. Take ECS as an example. Enter the ECS username and password.

    Winrm Port

    Yes

    Port 5986 is recommended. You may customize the port number.

  5. To add your Huawei Cloud ECS as the target host or proxy host, click Add Host, and select Importing ECS for Add Hosts by.

    The following requirements are mandatory for you to import the purchased ECS:

    • The ECS is running.
    • The ECS and host cluster have the same OS.
    • Proxy host has a public IP (proxy mode) when using official resource pool.
    • The ECS has been imported as a target host. It cannot be imported as a proxy host.

    In the proxy mode, you need to configure the proxy host before using the target host.

  6. Verify the host connectivity.

    After the host is added, the system automatically verifies the connectivity. If the connectivity verification fails, click Failed and rectify the fault based on the failure cause displayed in the dialog box or click View Solution.

Configuring a Linux Proxy

Required Resources

You have configured the following resources in a Virtual Private Cloud (VPC):

Resource Type

Supported Resource Specifications

Quantity

Description

EIP

Bandwidth ≥ 5 Mbit/s

2

1. When creating a proxy, you need to add an ECS bound to an elastic IP address as the proxy.

2. When creating an SNAT gateway, you need to bind an EIP to it.

Procedure

  1. Enable the SSH forwarding function of the proxy.

    • If the proxy mode is used, run the following command to check whether AllowTcpForwarding has been enabled for SSH on the proxy:
      grep AllowTcpForwarding "/etc/ssh/sshd_config"
    • If the value is no, set it to yes and run the following command to restart the sshd service:
      service sshd restart

  2. Configure SNAT for the proxy:

    1. Click in the upper left corner and choose Networking > to access the console.
    2. On the NAT Gateway console, click Buy Public NAT Gateway.
    3. Click Next. For details about the costs incurred during this process, see .
    4. After the NAT gateway is created, return to the NAT gateway list and click the target NAT gateway.
    5. On the NAT gateway details page, click the SNAT Rules tab, click Add SNAT Rule, configure required parameters, and click OK.
    6. Check whether the SNAT rule is added.

  3. Check routing policies.

    1. Go to the console. In the upper left corner of the page, click and choose Networking > Virtual Private Cloud to access the network console.
    2. Choose Virtual Private Cloud > Route Tables and click the target route table.

      Check the route information.

      Table 3 Description of route information

      Route Information

      Description

      Destination

      Destination CIDR block. The default value is 0.0.0.0/0. Select the IP address for the access environment based on project requirements.

      IP Addresses

      Click to check detailed information about the IP addresses.

      Next Hop Type

      Set it to NAT gateway.

      Next Hop

      Set it to the public NAT gateway that you have added the SNAT rule to.

      Type

      System: A system route is automatically added by the system and cannot be modified or deleted.

      Custom: A user-defined route is added by a user to direct traffic to a desired destination, and can be modified and deleted. The destination of a custom route cannot overlap with that of a system route.

      Description

      Description of the route.

      Operation

      You can modify and delete routes.

Configuring a Windows Proxy

Required Resources

  • A Windows host is available.
  • The network connection between the proxy and hosts is normal.

Procedure

  1. Log in to the proxy, open PowerShell, and run the netsh command. Replace the parameters based on the parameter descriptions.

    netsh interface portproxy add v4tov4 listenaddress=${proxy_ip}  listenport=${proxy_port}  connectaddress=${host_ip}  connectport=${host_port}

    For IPv6 hosts, replace v4tov4 in the following command with v6tov6.

    Table 4 Parameters

    Parameter

    Description

    ${proxy_ip}

    Private IP address of the proxy.

    ${proxy_port}

    Listening port of the proxy, for example, 54.

    ${host_ip}

    Private IP address of the host.

    ${host_port}

    Port of the host. Generally, the port is 5986.

  2. Enable the proxy listening port, that is, ${proxy_port} in the preceding command. For details, see Configuring a Security Group.