Forum Discussion
Sep 16, 2013
Hi Darshan,
this will be just a combination of both commands. Now 'switch' will be evaluated in the context of 'elseif':when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals 10.10.0.0/16] } {
snat 10.232.10.1
} elseif { [IP::addr [IP::remote_addr] equals 10.11.0.0/16] } {
switch [IP::addr [IP::client_addr] mask 255.255.255.0] {
10.11.1.0 { snat 10.232.11.1 }
10.11.2.0 { snat 10.232.11.2 }
10.11.3.0 { snat 10.232.11.3 }
default { snat 10.232.11.8 }
}
} else {
snat 10.232.8.8
}
}
Thanks, Stephan