Forum Discussion
Michael_Yates
Apr 26, 2011Nimbostratus
I think that you will need to change from [IP::local_addr] to [IP::remote_addr]
IP::local_addr - When called in a clientside context, this command returns the IP address of the virtual server the client is connected to.
IP::remote_addr - Returns the IP address of the host on the far end of the connection.
Other methods are shown here: http://devcentral.f5.com/wiki/default.aspx/iRules/SelectiveSNAT.html
We created an iRule that does the same / similar behavior but used Data Groups to contain all of the BigIP Networks. That way the iRule could be used on any Virtual Server. You could do something similar and use a specify a SNAT Pool.
when CLIENT_ACCEPTED {
if { [class match [IP::remote_addr] equals mynetwork] } {
snat automap
}
}