iRule to check if request comes from any node, any pool, or from list of pools or nodes.
Right now I have an iRule that does this: when CLIENT_ACCEPTED { Check if the client IP address is a node in the VIP's default pool if {[matchclass [IP::client_addr] equals [active_nodes -list [LB::server pool]]]}{
log local0. "SNAT'ing for [IP::client_addr], member of pool [LB::server pool]"
snat automap
} else { log local0. "NO SNAT [IP::client_addr]" } }
But I am getting ready to apply new iRules to that virtual server, that will redirect to other pools based on /someURL.
My problem, is that those other pools are not triggering the above iRule. They are not considered part of that virtual server. I assume because they are not the default pool.
Is there a way to just say something like:
when client_accept, if request comes from any node in any pool, then do x else do y
Or use a datagroup or something to say: when client_accept, if request comes from this list of nodes or pools do x else do y