Forum Discussion
How to send client ip to the backend, if we use iRule to map different context
Hi, Our scenario is Real Server a & b /context1 on port 8080, real server a & b /context2 on port 8081, and the big ip has a iRule to balance between this real server on the same port. I mean the user use or context2, to do this we configure iRule to balance depends of the context, but today the real client ip stay on f5.
No we need to send this real client ip to the backend server's, we try to disable automap but didn't work.
- jdevpros
Nimbostratus
This is our iRule
when HTTP_REQUEST { if {[HTTP::uri] contains "context1"}{ persist dest_addr pool context1_pool return}
if { [HTTP::uri] contains "context2"}{ pool context2_pool return} if { [HTTP::uri] contains "context3"}{ pool context3_pool return} }
- Samir_Jha_52506
Noctilucent
Enable X-Forward option in custom HTTP profile & attached to VIP to send client IP address to server.
- jdevpros
Nimbostratus
Thanks, we try this.
- jdevpros
Nimbostratus
But this is a header, so is possible to see the client ip like the client connect directly to real's server's? I mean, if we use netstat -an | grep client_ip
- Samir_Jha_52506
Noctilucent
You can check client IP with command tmsh Show sys connection | grep vip_ip
Recent Discussions
Related Content
* 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