I suppose you could write the 2 irules in the following that can be used
when CLIENT_ACCEPTED {
SNAT 10.X.Y.Z to 11.X.Y.Z
set xyz [findstr [IP::client_addr] 4 ]
snat 11.$xyz
}
and
when CLIENT_ACCEPTED {
SNAT 10.X.Y.Z to 11.X.Y.Z
set xyz [findstr [IP::client_addr] 4 ]
snat 10.$xyz
}
or you could bundle it up in one irule
when CLIENT_ACCEPTED {
if {[IP::addr "[IP::client_addr]/8" equals 10.0.0.0/8"]} {
set xyz "eleven"
} else if {[IP::addr "[IP::client_addr]/8" equals 11.0.0.0/8"]} {
set xyz "ten"
}
switch $xyz {
"eleven" { snat 11.$xyz }
"ten" { snat 10.$xyz }
}
}
Hope that helps
CB