Forum Discussion
smp_86112
Cirrostratus
May 26, 2010logging full TCP connection details
In my head, I have this picture of how a TCP connection with a SNAT-enabled Virtual Server looks:
[client_ip]:[client_port] <-> [VIP_ip]:[VIP_port] <-> [LTM_self_ip]:[LTM_port] <-> [Node_ip]:[Node_port]
However, I could figure out how to log three of these four connection points this during my research and testing:
[IP::client_addr]:[TCP::client_port] <-> ??? <-> [IP::local_addr]:[TCP::local_port] <-> [IP::server_addr]:[TCP::server_port]
Isn't there a way, using these built-in-type iRule constructs, to get the Virtual Server address and port that a client is connected to? I tried various combinations of these variables along with the serverside/clientside global commands, but I couldn't seem to come up with it.
- hoolio
Cirrostratus
Hi SMP, - smp_86112
Cirrostratus
Great reference again hoolio. This is what I came up with to give me what I was after:when CLIENT_ACCEPTED { set ext_src [IP::remote_addr]:[TCP::remote_port] set ext_dst [IP::local_addr]:[TCP::local_port] } when SERVER_CONNECTED { set int_src [IP::local_addr]:[TCP::local_port] set int_dst [IP::remote_addr]:[TCP::remote_port] log local0. "$ext_src->$ext_dst->$int_src->$int_dst" }
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