Security Group and Network ACL Rules
To ensure normal communications between the load balancer and backend servers, you need to check the security group and network ACL rules.
When backend servers receive requests from the load balancer, source IP addresses are translated into those in 100.125.0.0/16.
- Security group rules of backend servers must allow traffic from 100.125.0.0/16 to backend servers. For details about how to configure security group rules, see Configuring Security Group Rules.
- Network ACL rules are optional for subnets. If network ACL rules are configured for the subnet where the backend servers are deployed, the rules must allow traffic from the backend subnet of the load balancer to the subnet of the backend servers. For details about how to configure network ACL rules, see Configuring Network ACL Rules.

If Transfer Client IP Address is enabled for Layer 4 listeners, network ACL and security group rules will not take effect. You can use access control to limit which IP addresses are allowed to access the listener. Learn how to configure What Is Access Control?
Constraints
- If health check is enabled for a backend server group, security group rules must allow traffic over the health check port and protocol.
- If UDP is used for health check, there must be a rule that allows ICMP traffic. If there is no such rule, the health of the backend servers cannot be checked.
Configuring Security Group Rules
If you have no VPCs when creating a server, the system automatically creates one for you. Default security group rules allow instances in the security group to communicate with each other but block access from external networks. To ensure that the load balancer can communicate with associated backend servers over both the frontend and health check ports, configure inbound rules for the security group containing these servers.
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project.
- Under Compute, click Elastic Cloud Server.
- In the ECS list, click the name of the target ECS.
- Click the Security Groups tab, locate the security group, click its name, and view security group rules.
- Click the ID of a security group rule or Modify Security Group Rule. The security group details page is displayed.
- On the Inbound Rules tab, click Add Rule. Configure inbound rules based on Table 1.
Table 1 Security group rules Backend Protocol
Action
Protocol & Port
Source IP Address
HTTP
Allow
Protocol: TCP
Port: the port used by the backend server and health check port
100.125.0.0/16
TCP
Allow
Protocol: TCP
Port: health check port
100.125.0.0/16
UDP
Allow
Protocol: UDP and ICMP
Port: health check port
100.125.0.0/16
- Click OK.
Configuring Network ACL Rules
To control traffic in and out of a subnet, you can associate a network ACL with the subnet. Network ACL rules control access to subnets and add an additional layer of defense to your subnets. Default network ACL rules reject all inbound and outbound traffic. If the subnet of a load balancer or associated backend servers has a network ACL associated, the load balancer cannot receive traffic from the Internet or route traffic to backend servers, and backend servers cannot receive traffic from and respond to the load balancer.
Configure an inbound network ACL rule to allow access from 100.125.0.0/16.
ELB translates the public IP addresses into private IP addresses in 100.125.0.0/16 before forwarding traffic to backend servers. So public IP addresses cannot be configured as the source for a network ACL rule to prevent public IP addresses from accessing backend servers.

Network ACL rules configured for the backend subnet of the load balancer will not restrict the traffic from the clients to the load balancer. If these rules are configured, the clients can directly access the load balancer. To control access to the load balancer, configure access control for all listeners added to the load balancer. For details, see What Is Access Control?
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project.
- Click
in the upper left corner to display Service List and choose Networking > Virtual Private Cloud.
- In the navigation pane on the left, choose Access Control > Network ACLs.
- In the network ACL list, locate the target network ACL and click its name.
- On the Inbound Rules or Outbound Rules tab, click Add Rule to add an inbound or outbound rule.
- Action: Select Allow.
- Protocol: The protocol must be the same as the backend protocol.
- Source: Set it to 100.125.0.0/16.
- Source Port Range: Select a port range.
- Destination: Enter a destination address allowed in this direction. The default value is 0.0.0.0/0, which indicates that traffic to all IP addresses is permitted.
- Destination Port Range: Select a port range.
- (Optional) Description: Describe the network ACL rule if necessary.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot