Configuring Security Group Rules
Scenarios
Similar to a firewall, a security group is a logical group used to control network access. You can define access rules for a security group to protect the HECSs that are added to this security group.
- Inbound: Inbound rules allow external network data to be sent to the HECSs in the security group.
- Outbound: Outbound rules allow network traffic from the HECSs in the security group to be sent out of the security group.
For details about the default security group rules, see Default Security Groups and Security Group Rules. For details about configuration examples for security group rules, see Security Group Configuration Examples.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select your region and project. - Under Computing, click Hyper ECS.
- On the Hyper Elastic Cloud Server page, click the name of the target HECS.
The page providing details about the HECS is displayed.
- Click the Security Groups tab and then
. View security group rules. - Click the security group ID.
The system automatically switches to the Security Group page.
- On the Inbound Rules tab, click Add Rule. In the displayed dialog box, set required parameters.
You can click + to add more inbound rules.
Table 1 Inbound rule parameters Parameter
Description
Example Value
Protocol & Port
Specifies the network protocol. Example values are All, TCP, UDP, ICMP, and GRE.
Custom TCP
Port: specifies the port or port range over which data can reach your HECS. The value ranges from 1 to 65535. For details about common ports, see Common Ports.
22 or 22-30
Source
Specifies the source of the security group rule. The value can be another security group or a single IP address. For example:
- xxx.xxx.xxx.xxx/32 (IPv4 address)
- xxx.xxx.xxx.0/24 (subnet CIDR block)
- 0.0.0.0/0 (any IP address)
0.0.0.0/0
Description
Provides supplementary information about the security group rule. This parameter is optional.
The description can contain a maximum of 255 characters and cannot contain angle brackets (< or >).
N/A
- On the Outbound Rules tab, click Add Rule. In the displayed dialog box, set required parameters.
You can click + to add more outbound rules.
Figure 1 Add Outbound Rule
Table 2 Outbound rule parameters Parameter
Description
Example Value
Protocol & Port
Specifies the network protocol. Example values are All, TCP, UDP, ICMP, and GRE.
Custom TCP
Port: specifies the port or port range over which data can leave your HECS. The value ranges from 1 to 65535.
For details about common ports, see Common Ports.
22 or 22-30
Source
Specifies the source of the security group rule. The value can be another security group or a single IP address. For example:
- xxx.xxx.xxx.xxx/32 (IPv4 address)
- xxx.xxx.xxx.0/24 (subnet CIDR block)
- 0.0.0.0/0 (any IP address)
0.0.0.0/0
Description
Provides supplementary information about the security group rule. This parameter is optional.
The description can contain a maximum of 255 characters and cannot contain angle brackets (< or >).
N/A
- Click OK to complete the security rule configuration.
Verifying Configurations
After adding the security group rules, you can check whether the rules have taken effect. For example, you have deployed a website on an HECS. Users need to access your website over HTTP and port 80, and you have added the security group rule shown in Table 3.
Linux
To verify the security group rule on a Linux HECS:
- Log in to the HECS.
- Run the following command to check whether TCP port 80 is listened:
If command output shown in Figure 2 is displayed, TCP port 80 is listened.
- Enter http://EIP bound to the HECS in the address box of the browser and press Enter.
If the requested page can be accessed, the security group rule has taken effect.
Last Article: Security Group Configuration Examples
Next Article: Changing a Security Group

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.