Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

iRule error

When i try to save the IRULE it gives me the following error. Trying to block all non app traffic to vip combined with using a SDK on ASM

Here are the errors

1070151:3: Rule [/Common/ASM_SDK] error: /Common/ASM_SDK:3: error: [command is not valid in current event context (HTTP_REQUEST)][BOTDEFENSE::reason]

/Common/ASM_SDK:2: error: [command is not valid in current event context (HTTP_REQUEST)][BOTDEFENSE::action]

Below is the iRule:

when HTTP_REQUEST { if { ([BOTDEFENSE::action] eq "allow") && (not ([string tolower [BOTDEFENSE::reason]] starts_with "valid mobile application cookie")) } { BOTDEFENSE::action tcp_rst } }

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

It seems the BOTDEFENSE commands are only valid in the BOTDEFENSE_ACTION event. You are using them in the HTTP_REQUEST event. See:

https://devcentral.f5.com/wiki/iRules.BOTDEFENSE__action.ashx

0
Comments on this Answer
Comment made 1 month ago by Brandon 392

Thank you!

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

BOTDEFENSE:: namespace commands are not valid within an HTTP_REQUEST event.

Take a look at the Wiki - BOTDEFENSE_ACTION is the only valid event for BOTDEFENSE::action and BOTDEFENSE::reason

https://devcentral.f5.com/wiki/iRules.BOTDEFENSE__action.ashx https://devcentral.f5.com/wiki/iRules.BOTDEFENSE__reason.ashx

0
Comments on this Answer
Comment made 1 month ago by Brandon 392

Thank you

0