Forum Discussion
draco
Nimbostratus
Jan 06, 2019Is it possible to replace source ip as x forwarded ip?
Can we change the client/source ip before sending the request to the server with the x forwarded ip. The application team needs to use the source ip in their code.
Rico_368208
Nimbostratus
Jan 06, 2019Draco,
Here is an iRule that should take the contents of the X-Forwarded-For header and SNAT to that IP. I would be careful with this though as unless the F5 is set you be your default gateway, the server may try to send the data back to the client directly. This asymmetrical routing will cause issues with connection.
when HTTP_REQUEST
{
snat [HTTP::header value X-Forwarded-For]
}
If you have any issues with this iRule or any further questions, I am sure I can help.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects