Skip to content

NLB source IP preservation with TLS

0

Hello,

When using a Network Load Balancer with TLS listeners, will the backend targets still see the original client source IP address?

asked 4 days ago27 views
2 Answers
1

It depends on the the type of target you have for the target group. You can also set it to enabled or disabled using the preserve_client_ip.enabled attribute of the target group. As per documentation,

preserve_client_ip.enabled: Indicates whether client IP preservation is enabled. The value is true or false. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP, TCP_UDP, QUIC, and TCP_QUIC target groups.

Refer: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html

EXPERT
answered 4 days ago
EXPERT
reviewed 4 days ago
EXPERT
reviewed 4 days ago
0

Yes. Network Load Balancers preserve the original client source IP address even when using TLS listeners.

Unlike Application Load Balancers, NLBs operate at Layer 4. TLS termination at the NLB does not replace the source IP — backend targets continue to see the client’s IP as the source of the connection.

This makes NLBs suitable for workloads that require source IP visibility, such as IP-based allow-listing or protocol-level logging.

Documentation: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html

AWS
answered 4 days ago
AWS
EXPERT
reviewed 4 days ago
  • While the old OSI layer model is rarely very useful, TCP and UDP listeners operate at layer 4 (transport), but TLS runs on top of the layer 4 protocols and belongs on layers 5 (session) and 6 (presentation).

  • Only if you have preserve client IP enabled otherwise it sees the NLB internal IP

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.