Using VIP IP as variable for SNAT
I've been working with F5s for about 10 months but I didn't have to play with iRules until a couple of days ago. I apologize if this is a newb question, but I've been looking through documentation online and I haven't been able to figure it out.
We are using 10.2.1 on some F5 LTMs, and there is a bug that is causing us to have to use an iRule to handle SNAT for some of our new VIPs (see http://support.f5.com/kb/en-us/solu...r=21731086).
The iRule itself is simple: when CLIENT_ACCEPTED {snat x.x.x.x} (the IP that we're giving it is the IP of the VIP).
That works well enough if I don't mind creating a new iRule for each VIP, but I'm wondering if there is a way to setup a variable for the VIP IP, and then use that for the SNAT. For example, something like this:
when RULE_INIT {
set VIP_IP IP::local_addr
}
when CLIENT_ACCEPTED {snat $VIP_IP}
I actually tried the above and the F5 accepted it without an error but it didn't work :)
Is it possible to do this? And, if so, could someone point me in the right direction?
Thanks!