1

OS is CentOS 6.9, with fail2ban-0.9.6-1.el6.1.noarch

According to the fail2ban manual:

Every .conf file can be overridden with a file named .local. The .conf file is read first, then .local, with later settings overriding earlier ones. Thus, a .local file doesn't have to include everything in the corresponding .conf file, only those settings that you wish to override.

Modifications should take place in the .local and not in the .conf. This avoids merging problem when upgrading. These files are well documented and detailed information should be available there.

However, this does not seem to apply to the paths-*.conf files. I tried creating paths-common.local to override:

dovecot_log = /var/log/dovecot.log

but this was ignored. I found I had to modify paths-common.conf to get fail2ban to look at the right log file.

Did I misunderstand, or is the documentation just a bit too eager with "Every .conf file..." (or maybe it's a bug I should file in the tracker?)

4
  • What operating system and fail2ban version are you using?
    – sebix
    Dec 2, 2017 at 20:23
  • Have you read this: github.com/fail2ban/fail2ban/issues/820#issuecomment-57445680 to check which files are read and if the file is probably called files-overrides.local?
    – sebix
    Dec 2, 2017 at 20:25
  • @sebix OS and version added to the post
    – Ex Umbris
    Dec 2, 2017 at 23:19
  • As to the link, that seems to be it, I'm not where I can test it right now but will try it tomorrow. Based on the lack of hits in an explicit search for file2ban files-overrides (except for the link you provided) it appears that files-overrides.conf isn't documented.
    – Ex Umbris
    Dec 2, 2017 at 23:24

1 Answer 1

1

In the fail2ban current version of paths-common.conf there is a section at the top for includes:

[INCLUDES]

after  = paths-overrides.local

To override paths-common.conf create paths-overrides.local in the fail2ban directory & add a default section header to the top of it:

[DEFAULT]

dovecot_log = /path/to/mail.log

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .