Redirect traffic to pool member based on ip source
I 'm trying to create an iRule to redirect traffic sourced from a specific ip address (public ip) to the right pool member.
we have 2 isps ,and for each isp we have many public ip addresses .the load balancing is working perfectly .i decided to use a different public from one isp for the mail server ,so i created a virtual server and the incoming mail is working .the problem is that the outgoing mail are going through the load balance pool and the traffic somtimes(depending on the load balace algorithm ) goes through the wrong isp (second one)witch causes of course a problem and the traffic is never comming back.
so i decided to create an iRule fo fix this issue
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 193.46.x.x /29] } {
pool POOL_GW member 193.46.x.x ;
;
}
}
i applied the iRule on the server but it still not working .
note :i 'm usin snat to map the internal mail server ip to the public ip 193.46.x.x/29
any ideas?