bweber_12801
Dec 16, 2008Nimbostratus
iRule to SNAT based on IP
I am trying to setup an iRule that will send traffic from a specific host behind my F5 out a specific IP. I have a WildCard VS and an SNAT applied to the WildCard VS called "email" that directs all outbound traffic out my x.x.x.5 IP. I have a mail server sitting behind the F5 at 192.0.0.60. I want all traffic outbound from 192.0.0.60 to go out x.x.x.4 and not x.x.x.5. I also want to have all other traffic continue going out x.x.x.5. The iRule that F5 support recommended that I use is:
when CLIENT_ACCEPTED {
if { [IP::client_addr] equals "192.0.0.60" } {
use snat x.x.x.4
} else { use snat x.x.x.5 }
}
However when I put that iRule into my WildCard VS, I am unable to get any traffic outbound from 192.0.0.60. Without the iRule 192.0.0.60 obviously still goes out x.x.x.5. Any idea what might be wrong with the iRule?
Thanks!