I set snat pool to translate the source IP Address, but we need log every snat record, which client use which IP to translate, so I set an iRule:
when SERVER_CONNECTED {
log local5.warning “Connection from[IP::client_addr]Mapped to [serverside {IP::local_addr}]-> [IP::server_addr]”
}
the VS use the fastL4 profile, because it need use the feature of “Loose Initiation” and “Loose Close”. At this condition, this iRule is invalid, the log shows: TCL error: Rule server1 - Error: No connection established IP::client_addr needs an established connection! (line 1) invoked from within “IP::client_addr”
Does it mean that there is no server connection if use fastL4 profile?
What version are you running? There is a known issue you could be running into that was fixed in 9.4:
CR61257
Several rule commands are broken for SERVER_CONNECTED with a fastL4 virtual. The problem is that the SERVER_CONNECTED event is raised before there is a serverside filter context.
Else, can you try using LB::server in the LB_SELECTED event? I’m not certain whether this event is triggered if the packets aren’t part of a connection the BIG-IP is managing, but it might work.
I don’t believe there is a hotfix for this issue. Hoolio was pointing out that it’s been fixed in version 9.4 but that would require upgrading. You can certainly submit a ticket with Technical Support and ask about the possibility of a hotfix. You’ve already got the CR number and problem description which would help speed up the process tremendously.
Otherwise I’d recommend looking into the workaround he mentioned.