Help Center> Cloud Search Service> FAQs> Cluster Access/Cluster Connection> How Do I Use a NAT Gateway to Access CSS from the Internet?
Updated on 2023-09-20 GMT+08:00

How Do I Use a NAT Gateway to Access CSS from the Internet?

Perform the following operations:

1.Obtaining CSS Information

2.Configuring a NAT Gateway

3.Modifying Security Group Rules

4.Accessing CSS from the Internet

If your CSS clusters do not have the security mode enabled, do not access CSS through the NAT gateway. Otherwise, the cluster data will be exposed to the Internet.

Obtaining CSS Information

  1. Log in to the CSS management console.
  2. On the Clusters page, click the name of a cluster. The Basic Information page is displayed by default.
  3. In the Configuration Information area, view the Private Network Address, VPC, and Subnet information.

    Figure 1 Required information

Configuring a NAT Gateway

  1. Create a NAT gateway.

    1. Log in to the console and choose Service List > Networking >NAT Gateway. The Network Console page is displayed.
    2. Click Buy Public NAT Gateway. On the displayed page, configure related parameters. For details, see the section "Buying a NAT Gateway" in NAT Gateway User Guide.

      Set VPC and Subnet to the values you obtained in Obtaining CSS Information.

    3. Click Next, confirm the configurations, and click Pay Now.

  2. Add DNAT rules.

    1. On the Public NAT Gateways page, click the name of the NAT gateway you purchased. The details page is displayed.
    2. Choose DNAT Rules > Add DNAT Rule. For details, see section "Adding a DNAT Rule" in the NAT Gateway User Guide. When configuring DNAT rules, use the following settings:
      • EIP: Create an EIP on the EIPs page based on your service requirements.
      • Outside Port: Custom.
      • Private IP Address: private network IP address of CSS, which is the Private Network Address you obtained in Obtaining CSS Information.
      • Inside Port: 9200.
      • If your cluster contains multiple private IP addresses, add one DNAT rule for each address.
    3. Click OK.

Modifying Security Group Rules

  1. Log in to the CSS management console. In the navigation pane, click Clusters. On the displayed Clusters page, click the name of the target cluster to go to the Basic Information page
  2. On the Basic Information page, click Security Group.
  3. On the Basic Information page of the security group, click the Inbound Rules tab.
  4. Click Add Rule to add an inbound rule for port 9200.
  5. Click OK.

Accessing CSS from the Internet

  1. Enter https://IP:port or http://IP:port in the address box of the browser.

    • IP and port are an EIP and port you set when you added DNAT rules.
    • If you have enabled Security Mode for the cluster, enter https://IP:port and then enter the username and password that you set for security mode on the displayed page.
    • If you have not enabled Security Mode for the cluster, just enter http://IP:port.

Cluster Access/Cluster Connection FAQs

more