Forum Discussion

Techgeeeg_28888's avatar
Techgeeeg_28888
Icon for Nimbostratus rankNimbostratus
Aug 02, 2013

Snat iRule forLC

I have a link controller setup and i want the server1 and server2 to be translated to separate snat pools and go out via different gateway pool and the rest of the traffic should go out via default snatpool and gateway pool. So i have written the below iRule can some one comment if this is correct or there is some problem in the coding?

 

 

 

when CLIENT_ACCEPTED {

 

if { [class match [IP::client_addr] equals "Server1"]} {

 

snatpool snat_proxy1

 

pool GW_ISP1_Pool

 

} elseif {[class match [IP::client_addr] equals "Server2"]} {

 

snatpool snat_proxy2

 

pool GW_ISP2_Pool

 

}else {

 

 

snatpool Default

 

pool gateway_pool

 

}

 

}

 

 

4 Replies