fail2ban

Fail2Ban jail.local (conf)


I'm trying to get to grips with Fail2Ban jail conf.

A lot of the logpaths have what look like variables

i.e. logpath = %(apache_error_log)s

I don't see these defined anywhere. Are they externally defined? or how do I define them correctly (or change if defined already).

Many thanks.

I know I can individually replace each path but this seems a little crazy.


Solution

  • Fail2ban approach is to adapt these vars to the specific distribution you are using. In this way you rarely need to modifiy that paths. However, they are defined in etc/fail2ban/paths-*.conf. If not, try a generic

    grep -r "apache_error_dir" /etc/fail2ban
    

    to see where they are defined