- Newest
- Most votes
- Most comments
More info on this topic:
-
For Network Load Balancers, register your targets by instance ID to capture client IP addresses without additional web server configuration. For instructions, see Target group attributes instead of the following resolutions (refer the link)
-
For Network Load Balancers when you can register only IP addresses as targets, enable
proxy protocol version 2
on the load balancer. For instructions, see Enable proxy protocol instead of the following resolutions.
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/elb-capture-client-ip-addresses/
Behaviour depends on the type of ELB - NLB preserves Source IP (except for IP Address targets), whereas servers behind CLB & ALB see load balancer IPs as Source IPs in client requests and rely on x-forwarded-for header to indicate true source.
this is where the confusing part is:
I am using NLB, and I am seeing a few IP addresses (all my client connection seems all come from these few IP address based on the TCP server log). but reality is I have thousands of client accessing, and they are definitely not from these few IP addresses.
when I by pass the NLB, I see the correct IP address for the Client
Relevant content
- asked 6 months ago
- asked 3 years ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
Yes,I've tested, it's working in my setup
thanks, but this is not relevant to me , I am using Network Loadbalancer
Thanks for the clarification, I modified the answer, the link I provided has information for NLB as well.
thank you.