When you add a backend server to a backend server group, ensure that the rules of the security group that containing the backend server allows access from the VPC where the backend server resides, and that the destination port is that used by the backend server. You also need to configure the protocol and port used for health checks. If you use UDP for health checks, configure inbound rules to allow ICMP traffic. Otherwise, health checks cannot be performed on the added backend server.
If you have no VPCs when creating a server, the system will automatically create a VPC with default security rules. Default security group rules allow only communications among the servers in the VPC. You also need to configure inbound rules to enable the load balancer to communicate with these servers over the frontend port and health check port.
If the load balancer has a TCP or UDP listener and IP as a backend is disabled, security group rules and firewall rules will not take effect. To control traffic to backend servers, you can use access control to limit which IP addresses are allowed to access the listener. Learn how to configure access control.
Backend Protocol |
Policy |
Protocol & Port |
Source IP Address |
---|---|---|---|
HTTP or HTTPS |
Allow |
Protocol: TCP Port: the port used by the backend server and health check port |
Backend subnet of the load balancer |
TCP |
Allow |
Protocol: TCP Port: health check port |
|
UDP |
Allow |
Protocol: UDP and ICMP Port: health check port |
To control traffic in and out of a subnet, you can associate a firewall with the subnet. Similar to security groups, firewall rules control access to subnets and add an additional layer of defense to your subnets. Default firewall rules reject all inbound and outbound traffic. If the subnet of a load balancer or associated backend servers has a firewall 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 firewall rule to allow traffic from the VPC where the load balancer works to backend servers.