
Answer-first summary for fast verification
Answer: Look into the X-Forwarded-For header in the backend
Overall explanation Correct option: Look into the X-Forwarded-For header in the backend The X-Forwarded-For request header helps you identify the IP address of a client when you use an HTTP or HTTPS load balancer. Because load balancers intercept traffic between clients and servers, your server access logs contain only the IP address of the load balancer. To see the IP address of the client, use the X-Forwarded-For request header. Elastic Load Balancing stores the IP address of the client in the X-Forwarded-For request header and passes the header to your server. Incorrect options: Modify the front-end of the website so that the users send their IP in the requests - When a user makes a request the IP address is sent with the request to the server and the load balancer intercepts it. There is no need to modify the application. Look into the X-Forwarded-Proto header in the backend - The X-Forwarded-Proto request header helps you identify the protocol (HTTP or HTTPS) that a client used to connect to your load balancer. Look into the client's cookie - For this, we would need to modify the client-side logic and server-side logic, which would not be efficient.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your web application front end utilizes 5 EC2 instances that are managed by an Application Load Balancer (ALB). The application has been set up to log the IP address of the client making requests. Upon reviewing the captured data, you observe that all recorded IP addresses are identical, corresponding to the IP address of the ALB rather than the client's actual IP address.
What steps should you take to capture the real IP address of the client making requests to your web application?
A
Look into the client's cookie
B
Look into the X-Forwarded-For header in the backend
C
Look into the X-Forwarded-Proto header in the backend
D
Modify the front-end of the website so that the users send their IP in the requests
No comments yet.