Forum Discussion
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
}
}
2 Replies
- Michael_Yates
Nimbostratus
Hi Patti,
Your syntax checks out. I'd say test it.
- Patti_G_72768
Nimbostratus
Hi Michael, thank you very much!!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com