Laurent_SAMY_81
Feb 13, 2015Nimbostratus
irules to check if the client IP belongs to the Pool
Hi
I'm trying to write an irule to do selective SNAT but i get an error saying
invalid IP network mask specification (line 2) invoked from within "IP::addr [IP::client_addr] equals [active_members -list [LB::server pool]]"
Here you are my irule
when CLIENT_ACCEPTED { Check if the client IP address is a node in the VIP's default pool if { [IP::addr [IP::client_addr] equals [active_members -list [LB::server pool]]] }{
log local0. "SNAT'ing for [active_nodes -list [LB::server pool]] , member of pool [LB::server pool]"
snat automap
} else { snat none log "snat none [IP::client_addr] [IP::remote_addr] "} }
I don't know what is wrong...
Thank you for your help