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

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

Use of captcha without Proactive Bot Defense enable

Hi

We will like to use the captha on URI's we test for in a datagroup in a Irule. Can we do that without the use of a DOS profile with Proactive Bot Defence enable?

set res [BOTDEFENSE::action captcha_challenge]`

I have try to use captcha_challenge in a irule but with no succes.

0
Rate this Question
Comments on this Question
Comment made 20-Apr-2017 by Chris Grant

How are you testing the Captcha? Also, are you willing to post the irule for review? I'm assuming you have an http profile on the virtual server? Do you have an ASM policy as well?

0
Comment made 20-Apr-2017 by Per A 1

Hi

I have a virtual server with DOS profile without Pro Active Bot Defence and a ASM policy. There is a http profile on.

My irule I test with:

when HTTP_REQUEST {
    log local5. "Before captcha_challenge" 
    set res captcha_challenge
    if {$res ne "ok"} {
        log local5. "Unable to send captcha_challenge: "
    }
    log local5. "After captcha_challenge"    
}

From log:

<HTTP_REQUEST>: Before captcha_challenge
<HTTP_REQUEST>: Unable to send captcha_challenge:
<HTTP_REQUEST>: After captcha_challenge

But there is no captcha challenge as I was hoping for.

When using Pro Active Bot Defence I can get it to work, but the javascript do not fit to our web site so nice and it also stop Internet explore version 11 to stop in InPivate mode.

<BOTDEFENSE_ACTION>: resulting action tcp_rst reason "suspicious browser"
0
Comment made 21-Apr-2017 by Per A 1

Hi

I do this wrong I have understand since I assign the value captcha_challenge to res. Basic I took it as function I could use.

But can I use the captcha function in an irule?

0

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Based on what you are trying to do, you might be able to use this irule:

https://devcentral.f5.com/codeshare?sid=534

Be aware that captchas use javascript. So you may have some of the same issues with this that you had with bot defence. As such I would test this before putting it into production.

0
Comments on this Answer
Comment made 21-Apr-2017 by Per A 1

Hi

I was hoping I could use the buildin captcha. I will look on you suggestions. Thank you

0
Comment made 21-Apr-2017 by Chris Grant

To do that you would still need to use bot defence. Check out the following: https://devcentral.f5.com/wiki/irules.botdefense__captcha_status.ashx

0