Forum Discussion
O_B_247503
Nimbostratus
May 10, 2018iRule add host IP address for Logstashes
Hi all,
We have Logstashe service behind F5 and SNAT. Is there any way/iRule how can we add the actual client IP address to a syslog message ("host IP address")?
Thanks,
Ondrej
- Lee_Sutcliffe
Nacreous
You can use the command [IP::client_addr] to log the client IP address in the originating request. This will log to /var/log/ltm and if you have configured a syslog, will also log to the configured server.
E.g.
when CLIENT_CONNECTED { log local0. "Client IP:[IP::client_addr]" }
Alternatively you may want to look at X-Forwarded-For headers if it is appropriate for your environment.
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