Forum Discussion
Chad_Roberts_21
Nimbostratus
Jul 16, 2007Log IMAP user name
Any ideas on how I might go about writing an iRule which would log the user name given each time a user authenticates? I need to log the source IP and the username for correlating connections later. O...
Eric_van_Wilten
Nimbostratus
Jul 18, 2007Thanks bl0ndie.
Deathbywedgie, I combined snippetd from iRule sample "LogHttpTcpUdpToSyslogng" with the STREAM commands and came up with this:
---
when CLIENT_ACCEPTED {
STREAM::enable
STREAM::expression @LOGIN\ .*@
}
when STREAM_MATCHED {
set match [getfield [STREAM::match] " " 2]
set client "[IP::client_addr]:[TCP::client_port]"
set vip [IP::local_addr]:[TCP::local_port]
set node "[IP::server_addr]:[TCP::server_port]"
log local0.info "$match $client $vip $node"
STREAM::disable
}
---
Eric.
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
