Forum Discussion

Martin182's avatar
Martin182
Icon for Nimbostratus rankNimbostratus
Oct 16, 2023

X-Forwarded-For on L4 VS

Hello again guys,

I'm involved in a specific configuration these days. We have a simple virtual server configured in TCP mode that dismounts into a web service. So far, there was no specific requirement but I have been notified that they need to know the real IP of the clients connecting for statistical purposes.
Right now, between the balancer and the end nodes there is a snat, I had thought of configuring an x-forwarded-for, but as it is a tcp virtual server I think it is not possible.
Is there any alternative to solve this problem?, or is it necessary to replicate the virtual server in HTTP mode?

Thanks
Best regards

  • Hi Martin182,

    There are two possibilities to solve this:

    1. Configure the virtual server as standard and apply an http profile with x-forwarder-for " the most simple".

    2. Configure the F5 as a router with a couple of Virtual Servers 0.0.0.0/0 for TCP and UDP and make the Self-IP in the server's network of the F5, the default gateway for servers and avoid snat, it allows servers to reach outside through the F5.

    Hope it works.