clientside

Description

Causes the specified iRule commands to be evaluated under the client-side context. This command has no effect if the iRule is already being evaluated under the client-side context.

Syntax

clientside
clientside {<iRule commands>}

clientside

  • Returns 1 if the current event is in the clientside context or 0 if not.

clientside {<iRule commands>}

  • Causes the specified iRule commands to be evaluated under the client-side context.

Examples

when SERVER_CONNECTED {

   # Check if the client IP address is 10.1.1.80
   # [clientside {IP::remote_addr}] is equivalent to [IP::client_addr]
   if { [IP::addr [clientside {IP::remote_addr}] equals 10.1.1.80] } {

      # Do something like drop the packets in this example
      discard
   }
}

Changelog

LTM 11.5.2, 11.5.3, 11.6.0, 12.0.0
A runtime check is added: if the clientside connection does not exist, this command aborts execution and returns a TCL error. One common problem is such script: “clientside {SSL::disable}” when there is no client side connection, it needs to be updated to “SSL::disable clientside”.

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.