Forum Discussion
Vova_1985_18320
Nimbostratus
May 11, 2015iRule to get client internal IP (LAN)
Hi all,
I working with F5 (BIGIP 11.6). I looking for a way to get on the server side in my logs the internal IP of the client. We have internal system with 300 users (CRM) and they work with se...
Vova_1985_18320
Nimbostratus
May 11, 2015I found out that this iRule actually gives the required information: when HTTP_RESPONSE { HTTP::header insert X-Internal [IP::client_addr] }
However im not sure its a standard header field, and now my question is, can i replace x-forwarder-for by this field? I mean when i get to the server the x-forwarder-for field instead of see my public IP the iRule will replace it to Internal IP and i will get x-forwarder-for: 192.168.10.1?
Robert_Luechte2
Cirrus
May 11, 2015I'm not certain what you are doing with that iRule. [IP::client_addr] would return the client IP which would be the public IP address. And then you are inserting that IP address in a header going back to the client (since it's HTTP_RESPONSE event)?
Enabling x-forwarded-for in the HTTP profile will use the [IP::client_addr] value for that header. But you said that is providing the Public IP of the client, which makes sense since they are external customers.
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