Configuring Security Group Rules
Scenarios
After you create a security group, you can add rules to it. A rule applies either to inbound traffic or outbound traffic. After you add edge instances to the security group, the group's rules apply to the instances.
- Inbound rules control traffic to edge instances in the security group.
- Outbound rules control traffic from edge instances in the security group.
For details about the configuration examples of the security group rule, see Security Group Configuration Examples.
Constraints and Limitations
- Edge instances in different VPCs cannot communicate with each other even if these edge instances are associated with the same security group and inbound and outbound rules have been configured for the security group.
- Edge instances on subnets of different edge sites cannot communicate with each other even if inbound and outbound security group rules have been configured for the edge instances.
- By default, you can use one HUAWEI CLOUD account to create a maximum of 10,000 security group rules. If you want to configure more security group rules, increase the quota by referring to Quota Adjustment.
Procedure
- Log in to the management console.
- Hover on the left menu to display Service List. Under Content Delivery & Edge Computing, select Intelligent EdgeCloud.
The IEC Overview page is displayed.
- In the navigation pane on the left, choose Edge Networks > Security Groups.
- On the Edge Security Groups page, locate the security group, click Configure Rule in the Operation column or click the security group name in the Name column to view the security group details.
- Under Inbound Rules, click Add. In the displayed Add Inbound Rule dialog box, set the parameters.
- Click + to add more inbound rules.
- Click Copy at the end of a rule and modify the copied rule as required to quickly generate a new one.
Table 1 Inbound rule parameter description Parameter
Description
Example Value
Priority
Priority of the security group rule.
The priority value ranges from 1 to 100. The default priority is 1 and has the highest priority. The rule with a smaller value has a higher priority.
1
Action
Action of the security group rule.
Deny rules take precedence over allow rules if the rules have the same priority.
Allow
Protocol & Port
Network protocol. Possible values are All, TCP, UDP, ICMP, and GRE.
TCP
Port: Port or port range over which traffic can reach your edge instance. The port ranges from 1 to 65535. For details, see Common Ports Used by Edge Instances.
Enter ports in the following format:
- Individual port: Enter a port, such as 22.
- Consecutive ports: Enter a port range, such as 22-30.
- All ports: Leave it blank or enter 1-65535.
22, or 22-30, or 20,22-30
Source
Source: Source of the security group rule. The value can be a single IP address or another edge security group. Example:
- xxx.xxx.xxx.xxx/32 (IPv4 address)
- xxx.xxx.xxx.0/24 (subnet)
- 0.0.0.0/0 (any IP address)
0.0.0.0/0
Description
(Optional) Supplementary information about the security group rule.
The description can contain a maximum of 64 characters and cannot contain angle brackets (< or >).
N/A
- Under Outbound Rules, click Add. In the displayed Add Outbound Rule dialog box, set the parameters.
- Click + to add more outbound rules.
- Click Copy at the end of a rule and modify the copied rule as required to quickly generate a new one.
Table 2 Outbound rule parameter description Parameter
Description
Example Value
Priority
Priority of the security group rule.
The priority value ranges from 1 to 100. The default priority is 1 and has the highest priority. The security group rule with a smaller value has a higher priority.
1
Action
Action of the security group rule.
Deny rules take precedence over allow rules if the rules have the same priority.
Allow
Protocol & Port
Network protocol. Possible values are All, TCP, UDP, ICMP, and GRE.
TCP
Port: Port or port range over which traffic can leave your edge instance. The port ranges from 1 to 65535. For details, see Common Ports Used by Edge Instances.
Enter ports in the following format:
- Individual port: Enter a port, such as 22.
- Consecutive ports: Enter a port range, such as 22-30.
- All ports: Leave it blank or enter 1-65535.
22, or 22-30, or 20,22-30
Destination
Destination: Destination of the security group rule. The value can be a single IP address or another edge security group. Example:
- xxx.xxx.xxx.xxx/32 (IPv4 address)
- xxx.xxx.xxx.0/24 (subnet)
- 0.0.0.0/0 (any IP address)
0.0.0.0/0
Description
(Optional) Supplementary information about the security group rule.
The description can contain a maximum of 64 characters and cannot contain angle brackets (< or >).
N/A
- Click OK.
Verifying Configurations
After you add the security group rules, check whether the rules have taken effect. Assume that you deploy a website on an edge instance and add the following inbound rule to allow TCP traffic over port 80.
| Direction | Priority | Action | Protocol | Port/Range | Source |
|---|---|---|---|---|---|
| Inbound | 1 | Allow | TCP | 80 | 0.0.0.0/0 |
To verify the security group rule on a Linux edge instance:
- Log in to an edge instance.
- Check whether TCP port 80 is listened.
netstat -an | grep 80
- If command output shown in Figure 1 is displayed, TCP port 80 is listened.
- In the address box of the browser, enter http://EIP bound to the edge instance and press Enter.
If the requested page can be accessed, the security group rule has taken effect.
Last Article: Managing a Security Group
Next Article: Managing Security Group Rules

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