Forum Discussion
What_Lies_Bene1
Nov 20, 2012Cirrostratus
Try this;
when CLIENT_ACCEPTED {
This iRule would NAT the source IP in the DG_SRC and match it to a destination in DG_DEST
and then snat to the snatpool defined in DG_DEST as the value corresponding to the name.
if { [class match [IP::client_addr] equals "DG_SRC" ] } {
set snatpoolname [class match -value [IP::local_addr] equals "DG_DEST" ]]
if { not $snatpoolname equals "" } {
log local0. "Got Natted to $snatpoolname"
snatpool $snatpoolname
return
}
}
else { forward
log local0. "NOT GETTING NATTED !!!"
}
}