Forum Discussion

Patti_G_72768's avatar
Patti_G_72768
Icon for Nimbostratus rankNimbostratus
Oct 17, 2013

block unwanted user-agents with an iRule

Hi, I'm working on another iRule that is intended to deny any traffic that indicates an automated program has explored the site and to log the event.

I have a list of those programs and I created a data group which I reference in the rule. Below is the rule I tried to write to capture what is needed. Can the community review and provide feedback on it please?

when HTTP_REQUEST{

if ({[class match [string tolower [HTTP::header "User-Agent"]] contains _my_badbot_rule]})

              {
              log local0. "Request indicates an automated program explored the site."
              reject
       }
   }