Your targets’ firewalls must admit the load balancer, on the target port and on
the health check port if that’s different. Without that, health checks time out and targets stay
unhealthy with health_check_timed_out.
A target on its VPC’s default firewall already admits it, with nothing to do. The rest of this page is for your own firewalls.
Add a rule whose peer is the load balancer. It stays right however the load balancer changes, and you never need to know its addresses.
{
"direction": "inbound",
"protocol": "tcp",
"ports": { "from": 8080, "to": 8080 },
"peer": { "loadBalancer": "lbr_4k2m9x0a7qpe" }
}ezgh compute firewalls rules add web --direction inbound --protocol tcp \
--ports 8080 --peer-load-balancer lbr_4k2m9x0a7qpeIn the console, the rule editor offers Load balancer as a source. When a target’s health checks time out on a network interface whose firewalls don’t admit its load balancer, the target group’s page offers to add the rule.
- Each load balancer you admit takes one of an interface’s 8 firewall references.
- You need
lb.loadBalancers.geton the load balancer to name it in a rule. - A load balancer in a rule can’t be deleted: delete the rule first.
- A rule allowing a CIDR that covers the load balancer’s subnet works too, but it also admits everything else in that range.
Clients are limited on the listener, by its allowed sources, not on your targets’ firewalls: to your targets, every connection comes from the load balancer.