ToonVA
Jun 20, 2019Cirrus
Log client source IP when connecting to TCP Virtual by iRule
Hi All,
I received the request if it is possible to log the client IP when connecting to the virtual IP.
We did this already based on an HTTP Virtual but now it's for an SMTP relay with regular TCP and so we can't attached the same iRule.
when HTTP_REQUEST {
if { [info exists logged] && $logged == 1 }{
# Do nothing. Already logged for this connection
} else {
set logged 1
log "ClientIP Information, from [IP::remote_addr] to vip [IP::local_addr] Cipher [SSL::cipher name]:[SSL::cipher version]:[SSL::cipher bits] User-Agent:[HTTP::header "User-Agent"]"
}
}
I tried to find something similar just for plain TCP but was not able to find it and therefor i come checking in with you guys.
Does someone has information on how we can achieve this? (iRule or other method)