Forum

URL Toolkit

Martijn
14 November 2013, 15:30
I want to extend the some of the mod_security rules (for Apache) to Hiawatha.

Like the bad_robots and scanners.

What would be the best solution for the toolkit config?

This:
UrlToolkit {
ToolkitID = bad_robots
Header User-Agent webmole DenyAccess
Header User-Agent wisenutbot DenyAccess
Header User-Agent prowebwalker DenyAccess
Header User-Agent hanzoweb DenyAccess
Header User-Agent email DenyAccess
etc
etc
etc
}

UrlToolkit {
Call bad_robots
ToolkitID = wordpress
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}

Or this:
UrlToolkit {
ToolkitID = bad_robots
Header User-Agent (webmole|wisenutbot|prowebwalker|hanzoweb|email |etc|etc|etc|etc) DenyAccess
}

UrlToolkit {
Call bad_robots
ToolkitID = wordpress
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}

etc means the are about 145 bad robots to block, so the list is long.

Which config would hit performance the most?


Hiawatha version: 9.2
Operating System: Debian 7
Hugo Leisink
16 November 2013, 22:54
Why going through all this trouble just to block some bots? Just ignore them. But if you really want to block them, use the second one. It's shorter, therefore faster.
Martijn
18 November 2013, 21:07
You're probably right about the extra trouble. Tnx for the tip.
This topic has been closed.