Forum Discussion

Peter_Z's avatar
Peter_Z
Icon for Cirrus rankCirrus
Apr 11, 2018

Trigger iRule action when first packet hits ForwardingIP Virtual Server

Hello, We need to perform certain actions when the first packet (TCP SYN) hits forwarding virtual server which serves as a default gateway for some servers. Namely we need to do SNAT and select specific gateway/nexthop to route.

I've tried the following, but the problem is that the EVENT is not triggered when the first packet hits the VS - I believe it is triggered when TCP Handshake is done.

when CLIENT_ACCEPTED {
 log local0. "iRule even CLIENT_ACCEPTED triggered"
 if { [getfield [IP::client_addr] "%" 1] equals "192.168.20.0/24" } {
         
         SNAT 
        snat 192.168.10.234
         Set the next-hop to 192.168.10.201
        nexthop 192.168.10.201
   }
}

Is there a way to achieve the goal when the first packet hits Forwarding VS?