Forum Discussion

Dustin_Schueman's avatar
Dustin_Schueman
Icon for Nimbostratus rankNimbostratus
Sep 30, 2014

IRule to disable APM

I would like to use an IRule applied to the VIP to disable APM when a certain client connects to the VIP. Here is what I'm trying but I get an error.

 

when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 10.63.134.26] or [IP::addr [IP::client_addr] equals 10.63.134.27] and [IP::addr [IP::local_addr clientside] equals 10.63.27.108]} { ACCESS::disable } }

 

2 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Hi Dustin,

     

    First thing I see is ACCESS::disable command is not available in CLIENT_ACCEPTED event, needs to be HTTP_REQUEST.

     

    ACCESS__disable

     

    Rgds

     

    N

     

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Notice some curly brace issues too. Try this:

    when HTTP_REQUEST { 
    
    if { ([IP::addr [IP::client_addr] equals 10.63.134.26] or [IP::addr [IP::client_addr] equals 10.63.134.27]) and ([IP::addr [IP::local_addr clientside] equals 10.63.27.108]) } { 
       ACCESS::disable 
     }
    }