Forum Discussion
nitass
Feb 03, 2012Employee
vs variable and SERVER_CONNECTED event are used for logging. please feel free to remove it.
this is data group version.
[root@ve1023:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set vs "[IP::local_addr]:[TCP::local_port]"
if {[class match -- [IP::client_addr] equals subnet_list]}{
pool foo1
} else {
pool foo2
}
}
when SERVER_CONNECTED {
log local0. "[IP::client_addr]:[TCP::client_port] -> $vs -> [IP::server_addr]:[TCP::server_port]"
}
}
[root@ve1023:Active] config b class subnet_list list
class subnet_list {
network 172.28.19.0/24
}
[root@ve1023:Active] config cat /var/log/ltm
Feb 3 08:51:04 local/tmm info tmm[4369]: Rule myrule SERVER_CONNECTED: 172.28.19.80:59652 -> 172.28.19.79:80 -> 200.200.200.101:80
Feb 3 08:51:07 local/tmm info tmm[4369]: Rule myrule SERVER_CONNECTED: 192.168.204.8:53813 -> 172.28.19.79:80 -> 200.200.200.102:80