Forum Discussion

Chris_Hotchkiss's avatar
Chris_Hotchkiss
Icon for Nimbostratus rankNimbostratus
May 14, 2013

SNAT based upon destination port

I have a requirement to load balance to a pool of IP address:ports and additionally present a dedicated IP source address based upon the destination port. I have a simple iRule that I thought would accomplish that but it isn't performing the SNAT function. It is load balancing to the correct destination ports but the source IP is the native IP of the client. Is there something wrong with my rule?

 

 

when LB_SELECTED {

 

if {[TCP::remote_port] equals 13261} {

 

snat 192.168.248.81

 

}

 

elseif {[TCP::remote_port] equals 13262} {

 

snat 192.168.248.82

 

}

 

elseif {[TCP::remote_port] equals 13263} {

 

snat 192.168.248.83

 

}

 

}

 

 

Thanks.

 

6 Replies