Hi Muthu_435 ,
From your query , I see you need to log all traffic , which is a bad approach no need for that.
You need to log all traffic in troubleshooting by Taking Packet captures / or assigning irule or Local traffic policy to do that.
It's applicable yes , but in heavy virtual servers / Websites , you will fill your Log files with un needed info for normal users.
But you still can do it.
create simple LTM policy and Log ( Client address , Virtual server Local address ) also you can Log almost any information in each request , but this a bad approach and recommended to keep your logfiles for errors / or alarms only.
Code
when CLIENT_ACCEPTED {
set client "[IP::client_addr]:[TCP::client_port]"
set vip "[IP::local_addr]:[TCP::local_port]"
set snat "unknown"
set node "unknown"
}
when SERVER_CONNECTED {
set snat "[IP::local_addr]:[TCP::local_port]"
set node "[IP::server_addr]:[TCP::server_port]"
}
when CLIENT_CLOSED {
log connection info
log local0.info "Client $client -> VIP: $vip -> SNAT: $snat -> Node: $node"
}
This is a sample irule for that , I haven't test it but it's logic looks fine.
but as I said this is a bad approch , use it only for debugging or troubleshooting and disable it in normal scenarios / cases.
I hope this helps you 🙂