Updated on 2026-04-29 GMT+08:00

Binding an EIP

Scenarios

After a replica set instance is created, you can bind an EIP to it to allow access from public networks. If the EIP is no longer needed, you can unbind it from the instance.

Binding an EIP directly to the instance increases security risk. If security rules are misconfigured or a vulnerability is exploited, an attacker may obtain your access credentials and perform malicious operations on database resources. If you need to access the instance over a public network, you are advised to use a public gateway. For details, see Binding a Public Gateway.

Precautions

  • A deleted EIP cannot be unbound.
  • Before accessing a DB instance, request an EIP on the VPC console and add an individual IP address or an IP address range that will access the DB instance to the security group's inbound rules. For details, see Configuring Security Group Rules.
  • For replica set instances, EIPs can be bound only to the primary and secondary nodes. To bind a new EIP to a node that is already associated with an EIP, you must first unbind the existing one.

Binding an EIP

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the name of the target replica set instance.
  5. In the navigation pane on the left, choose Connections. Click the Public Connection tab. In the Basic Information area, locate the target node and choose More > Bind EIP in the Operation column.

    Figure 1 Binding an EIP

    You can also locate the node in the Node Information area on the Basic Information page and choose More > Bind EIP in the Operation column.

    Figure 2 Binding an EIP

  6. The displayed dialog box shows EIPs in the Unbound state. Select an EIP and click OK. If no available EIPs are displayed, click View EIP and create one.

    Figure 3 Selecting an EIP

  7. In the EIP column of the target node, verify that the EIP has been successfully bound.

    If the EIP is no longer needed, unbind the EIP.

Unbinding the EIP

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the name of the replica set instance that contains the node with the bound EIP.
  5. In the navigation pane on the left, choose Connections. Click the Public Connection tab. In the Basic Information area, locate the target node and click More > Unbind EIP in the Operation column.

    Figure 4 Unbinding the EIP

    You can also locate the node in the Node Information area on the Basic Information page and choose More > Unbind EIP in the Operation column.

    Figure 5 Unbinding the EIP

  6. In the displayed dialog box, click OK to unbind the EIP.