Step 2: Configure Security Group Rules
Scenarios
The following describes how to set security groups.
- If the ECS and DB instance are in the same security group, they can communicate with each other by default. No security group rule needs to be configured. Go to Step 3: Connect to a GaussDB(for Cassandra) Instance Over Private Networks.
- If the ECS and DB instance are in different security groups, you need to configure security group rules for them, separately.
Precautions
- The default security group rule allows all outgoing data packets. ECSs and GaussDB NoSQL instances in the same security group can access each other. After a security group is created, you can create different rules for that security group, which allows you to control access to the GaussDB NoSQL instances that in it.
- By default, you can create up to 500 security group rules. However, too many rules increase network latency for initial access, so it is recommended that you add no more than 50 rules for each security group.
- To access the GaussDB NoSQL instances in a security group from a source outside of that group, you need to create an inbound rule.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project. - Click Service List. Under Network, click Virtual Private Cloud.
- In the navigation pane on the left, choose .
- On the Security Groups page, click the security group name.
- On the Inbound Rules tab, click Add Rule. In the displayed Add Inbound Rule dialog box, set required parameters to add inbound rules. On the Outbound Rules tab, click Add Rule. In the displayed Add Outbound Rule dialog box, set required parameters to add outbound rules. Figure 1 Add Inbound Rule
Figure 2 Add Outbound Rule
- In the displayed dialog box, set required parameters.
Table 1 Parameter description Parameter
Description
Value Example
Protocol
The network protocol required for access. You can allow all protocols or specify a specific protocol, TCP, UDP, ICMP, and SSH.
TCP
Port
Specifies the port that allows the access to ECSs or external devices. Common ports are listed in Common Ports Used by ECSs.
8635
Source/Destination
Specifies the supported IP address and security group that the rule applies to.
- IP address: The IP address or subnet that the rule applies to. Single IP addresses must be expressed using slash notation.
- Single IP address: xxx.xxx.xxx.xxx/32 (IPv4)
- Subnet: xxx.xxx.xxx.0/24
- All IP addresses: 0.0.0.0/0
- Security Group: A security group that access will be allowed from. ECSs in this security group will be granted access to GaussDB NoSQL the instance in the current security group
- 192.168.10.0/24
- default
- IP address: The IP address or subnet that the rule applies to. Single IP addresses must be expressed using slash notation.
- Click OK.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.