How to add regular expressions to apache-badbots filter

Created:

2017-06-20 23:34:56 UTC

Modified:

2017-08-16 16:01:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to add regular expressions to apache-badbots filter

Applicable to:

  • Plesk for Linux

Question

How to add regular expressions to apache-badbots filter?

Answer

  1. Go to Tools & Settings > Updates & Upgrades.
  2. Install Fail2Ban component.
  3. Go to Tools & Settings > IP Address Banning (Fail2Ban) > Jails .
  4. Click on Manage Filters .
  5. Click on apache-badbots .

There will be a long list of regular expressions separated by the '|' symbol meaning the logical 'or'.

To add a new definition, find the "badbots" line, the longest in the list, and point to the end of it.

Add a regular expression to the end of the line separating it with the '|' symbol from the prior expressions. For example, if the line ends with "WEP Search 00", it would look like:

...WEP Search 00|(?:a(?:ip|pple)

Now press Apply to apply the changes.

Have more questions? Submit a request
Please sign in to leave a comment.