Bug 1269226

Summary: fail2ban does not work out of box in a minimal Fedora 22 install
Product: [Fedora] Fedora Reporter: Marcos Mello <marcosfrm>
Component: fail2banAssignee: Orion Poplawski <orion>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: alick9188, athmanem, axel.thimm, jonathan.underwood, orion, vonsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 18:07:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcos Mello 2015-10-06 18:05:12 UTC
Fedora does not install a traditional syslog daemon by default for some time now.

For things work, fail2ban needs to depend on fail2ban-systemd or on a syslog implementation that provides /var/log/secure et al. We have a virtual package 'syslog' for that.

RHEL 7 still uses rsyslogd by default and a 'Requires: syslog' for EPEL 7 is not urgent.

For Fedora I do not know. fail2ban stopped depending on fail2ban-systemd recently because some program did log to the journal. But adding 'Requires: syslog' may be overkill for folks that would be happy using the journal...

Opinions?

Comment 1 Marcos Mello 2015-10-06 18:15:15 UTC
The use case is a simple sshd jail.

Comment 2 Orion Poplawski 2015-10-07 03:20:03 UTC
I'm not sure there is a good solution to this situation.  Perhaps the default for those jails that work with the journal could be set to the journal, but not others.

Comment 3 Marcos Mello 2015-10-07 09:48:11 UTC
The offending program 'jaila' logs where? journald captures syslog messages too (as well as all stout/stderr from services).

About syslog virtual package, I realise now systemd also provides it...

Comment 4 Orion Poplawski 2015-10-08 01:30:20 UTC
I really don't understand what you mean by "offending program 'jaila'".

That seems a bit strange that systemd provides syslog.  But then again, only one thing seems to require it at this point.

Comment 5 Orion Poplawski 2015-10-08 01:53:50 UTC
Filed https://github.com/fail2ban/fail2ban/pull/1213 as an idea to fix this.

Comment 6 Marcos Mello 2015-10-08 09:32:40 UTC
I was referring to
http://pkgs.fedoraproject.org/cgit/fail2ban.git/commit/?id=4fa088d4

Comment 7 Marcos Mello 2015-10-08 09:45:44 UTC
Doh, sorry, it is a typo.

But anyway it should work for any daemon that logs to journald directly (libsystemd's sd_journal_*() family), to glibc's syslog facility or to stdout/stderr if the service does not have StandardOutput=/StandardError= configured to null.

journald is a syslog implementation after all. Just not a "traditional" one.

Comment 8 Marcos Mello 2015-10-08 10:07:23 UTC
I remembered this bug we should be aware of:
https://bugzilla.redhat.com/show_bug.cgi?id=1227396

If the lack of space suffixes can affect fail2ban regexes I have no idea.

Comment 9 Orion Poplawski 2015-10-08 14:02:12 UTC
(In reply to Marcos Mello from comment #6)
> I was referring to
> http://pkgs.fedoraproject.org/cgit/fail2ban.git/commit/?id=4fa088d4

The problem was that apache httpd in particular (which is a large part of what people use fail2ban to match on) does not log to the journal.  People expected that simply enabling the jails they wanted would activate them, but this silently failed since they were monitoring the journal and nothing was logged there.

Comment 10 Fedora Update System 2016-03-09 21:32:19 UTC
fail2ban-0.9.4-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-10b5fefb0d

Comment 11 Fedora Update System 2016-03-10 16:51:20 UTC
fail2ban-0.9.4-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-10b5fefb0d

Comment 12 Fedora End Of Life 2016-07-19 18:07:23 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.