Elastic Load Balancer is not internet-facing
Elastic Load Balancers are evaluated for the scheme to determine whether they are internet-facing or internal, indicating if the endpoint is publicly reachable via a public DNS name.
Risk
An unintended internet-facing load balancer exposes backends to the Internet, enabling reconnaissance, credential stuffing, and exploitation of app flaws. This can lead to data exposure (confidentiality), unauthorized changes (integrity), and DDoS or resource exhaustion (availability).
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks elb_internet_facingRecommendation
Use internal load balancers for private services and restrict exposure with security groups, subnets, and allowlists. For public endpoints, apply defense in depth: associate an AWS WAF web ACL (when supported), enforce TLS, least-privilege network rules, and consider Shield or rate limiting. Regularly review necessity of public access.
Remediation
Terraform
resource "aws_lb" "<example_resource_name>" {
internal = true # CRITICAL: sets scheme to internal so it's not internet-facing
subnets = ["<example_resource_id>", "<example_resource_id>"]
security_groups = ["<example_resource_id>"]
}NativeIaC
# CloudFormation: create an internal load balancer
Resources:
<example_resource_name>:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Scheme: internal # CRITICAL: makes the load balancer internal (not internet-facing)
Subnets:
- <example_resource_id>
- <example_resource_id>
SecurityGroups:
- <example_resource_id>Other
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.elb.elb_client import elb_client
class elb_internet_facing(Check):
def execute(self):
findings = []
for lb in elb_client.loadbalancers.values():
report = Check_Report_AWS(metadata=self.metadata(), resource=lb)
report.status = "PASS"
report.status_extended = f"ELB {lb.name} is not internet facing."
if lb.scheme == "internet-facing":
report.status = "FAIL"
report.status_extended = (
f"ELB {lb.name} is internet facing in {lb.dns}."
)
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/waf/latest/developerguide/web-acl-associating-aws-resource.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticloadbalancingv2-loadbalancer.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/ELB/internet-facing-load-balancers.html