Posted By L4L7 on 03/07/2010 01:43 PM
Gah - what was I thinking? Sorry about that, try this one instead. Obviously change your snat IPs to something sensible, and be sure and change the last "else" to something if you don't want to simply forward the traffic on.
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.9.9.0/26] }{
snat 1.1.1.1
}
elseif { [IP::addr [IP::client_addr] equals 10.9.9.65/26] }{
snat 2.2.2.2
}
elseif { [IP::addr [IP::client_addr] equals 10.9.9.128/26] }{
snat 3.3.3.3
}
else {
forward
}
}
-Matt
This works great in version 9, but is there a way to do this this if you
7 subnets total? The elseif statement argument is limited to three.
That plus the initial statement only gets you 4 total subnets.