jmloveless_4477
Nov 09, 2010Nimbostratus
iRule to SNAT and select pool member
Good evening,
I am using the LC with an irule on the default gateway pool to snat a particular internal client to an outside address (overriding the automap on the default gateway pool). The SNAT works great until the connection is routed out the wrong ISP. I need to be able to set the SNAT and Pool member with the same irule. I have tried couple things but they dont seem to work, any input would be appreciated!!!
here is an example of one iRule I have tried:
when CLIENT_ACCEPTED {
if {[IP::addr "[IP::client_addr]" equals "10.251.1.65"]} {
snat X.X.X.10
pool default_gateway_pool member X.X.X.1 0
}
elseif {[IP::addr "[IP::client_addr]" equals "10.40.14.12"]} {
snat Y.Y.Y.10
pool default_gateway_pool member Y.Y.Y.1 0
}
}