SNAT iRule based on outbound destination address
Don't know if this is the correct way to do it, but I am trying to configure Outbound SNAT based on the destination address.
The scenario is that I have an internal server with an IP address of (for example) 192.168.1.100. This server needs to initiate outbound communication to certain internet based systems but use a different SNAT address for each.
So if I wanted to communicate out to 172.16.10.10 on the Internet (for example), I want the outbound SNAT set as 10.10.10.10 (again for example). If I wanted to communicate out to 172.16.20.20, the SNAT must be different at 10.10.20.20.
I have been reading about intelligent SNAT and iRule rules but was wondering whether this is the correct way, and if so whether anyone could suggest some example iRules?