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