Hi Nicola,
Here is a version which checks of the requested port is 20000 and the client IP is one of the two listed, or if the requested port is 21000:
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: New TCP connection to [IP::local_addr]:[TCP::local_port]"
if {[TCP::local_port] == 20000 and ([IP::addr [IP::client_addr] equals 10.130.167.23] or [IP::addr [IP::client_addr] equals 10.130.167.24])}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched first check, using snap_pool_1"
snatpool snat_pool_1
} elseif {[TCP::local_port] == 21000 and ([IP::addr [IP::client_addr] equals 10.130.167.23] or [IP::addr [IP::client_addr] equals 10.130.167.24])}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched second check, using snap_pool_2"
snatpool snat_pool_2
}
}
When you're done testing, you can comment out the log statements.
Aaron