I am developing a Java application. The client sends socket request to the sever after the F5 loadbalancer. The server should record the IP address of the socket request. How can I get the real IP address of the client instead of the IP addreess of the F5.
Asked
Active
Viewed 905 times
1
-
2If the load balancer doensn't add the original ip as a header then you're out of luck – Michael Wiles Jan 28 '19 at 15:10
-
@MichaelWiles You don't always _need_ to add anything. – Eugène Adell Jan 29 '19 at 10:06
1 Answers
1
If you are using SNAT, your Virtual Server must be configured with an HTTP Profile, and this profile must have the Insert X-Forwarded-For enabled. As simple as that.
Of course this means the server must be able to use this header.
If the loadbalancer doesn't use any SNAT, you would already see the client's IP.

Eugène Adell
- 3,089
- 2
- 18
- 34