SLB access control
Control access to your SLB resources by configuring ACLs and security groups.
Overview
SLB supports the following access control methods:
-
ACL
Configure whitelists or blacklists on ALB and CLB listeners to allow or deny client requests.
-
Security group
Security groups act as virtual firewalls with Stateful Packet Inspection (SPI) and packet filtering to control inbound and outbound traffic.
Add ALB or NLB instances to security groups and configure rules to control inbound traffic.
ACL
Configure whitelists or blacklists for ALB and CLB listeners:
-
Enable a whitelist: Only requests from the IP addresses or CIDR blocks specified in the selected ACL are forwarded. A whitelist is suitable for scenarios where you want to allow access only from specific IP addresses.
Whitelists carry business risks. Only the IP addresses in the whitelist can access the SLB listener.
-
Enable a blacklist: All requests from the IP addresses or CIDR blocks specified in the selected ACL are not forwarded. A blacklist is suitable for scenarios where you want to restrict access from only specific IP addresses.
Security group
By default, ALB and NLB listener ports accept all requests before the instance is added to a security group.
To control inbound traffic, add your ALB or NLB instance to a security group and configure rules based on your requirements.
-
Outbound traffic (responses to user requests) is not restricted by ALB or NLB security groups. You do not need to configure outbound rules.
-
When an ALB or NLB instance is created, the system automatically creates a managed security group in the instance's VPC. You can view this security group but cannot modify it. The managed security group contains the following rules:
-
Rules with priority 1: Allow the local IP addresses of the ALB or NLB instance for backend server communication and health checks.
Do not add priority-1 deny rules for the instance's local IP addresses. Such rules may disrupt backend server communication. Check local IP addresses in the ALB console or NLB console.
-
Rules with priority 100: Allow all IP addresses. Without deny rules, the ALB or NLB instance processes all requests through its listeners.
-
The default access control rules of basic and advanced security groups include an invisible deny-all rule. The default allow rule in the managed security group takes precedence for the ALB or NLB instance.
-
For more information about ALB security group configurations, see:
For more information about NLB security group configurations, see: