Forum Discussion
M_Saeed
Nov 10, 2023Cirrus
Hello,
Correct this iRule and test this one and let me know :
when LB_SELECTED {
# Once pool member has been selected check if it's 1.0.0.2
if { [IP::addr [LB::server addr] equals 1.0.0.2] } {
snat automap
} }
In this iRule, when a pool member is selected, it checks if the server's IP address (`[LB::server addr]`) is equal to `1.0.0.2`. If the condition is true, it applies the `snat automap` command, enabling automatic SNAT.
make sure you are assigning specific route for such routed flow for this node. and note that the iRule assumes the IP address `1.0.0.2` is the specific condition you want to match. Make sure to adjust it according to your specific requirement and don't enable snat under such VIP but only this iRule.
Best,
MSaeed