Forum Discussion
nitass
Nov 25, 2014Employee
Is there anyway i can get rid of that in the same irule.
you may set variable in CLIENT_ACCEPTED and then check it in SERVER_CONNECTED.
e.g.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
if { [class match -- [IP::local_addr] equals onCampus_networks] } {
set is_snat 0
snat none
} else {
set is_snat 1
snatpool snat_pool
}
}
when SERVER_CONNECTED {
if { $is_snat } {
log local0. "Client [IP::client_addr]:[TCP::client_port] \
SNATed to [IP::local_addr]:[TCP::local_port] \
connecting to [IP::remote_addr]:[TCP::remote_port]"
}
}
}
The class match didn't work out here. Not sure if this has something to do with the data-group containing multiple records.
can you post the data group?
tmsh list ltm data-group internal (name)