Bug 32592 - fail2ban не работает с бэкендом systemd
Summary: fail2ban не работает с бэкендом systemd
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: fail2ban (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Grigory Ustinov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-08 09:58 MSK by Вадим Илларионов
Modified: 2016-12-05 11:38 MSK (History)
20 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Вадим Илларионов 2016-10-08 09:58:52 MSK
В журнале такое:

окт 08 14:32:53 gw fail2ban.jail[5866]: INFO Creating new jail 'recidive'
окт 08 14:32:53 gw fail2ban.jail[5866]: ERROR Backend 'systemd' failed to initialize due to No module named systemd
окт 08 14:32:53 gw fail2ban.jail[5866]: ERROR Failed to initialize any backend for Jail 'recidive'
окт 08 14:32:53 gw fail2ban.transmitter[5866]: WARNING Command ['add', 'recidive', 'systemd'] has failed. Received RuntimeError("Failed to initialize any backend for Jail 'recidive'",)
окт 08 14:32:53 gw fail2ban-client[5831]: ERROR  NOK: ("Failed to initialize any backend for Jail 'recidive'",)

[root@gw etc]# python -c 'from systemd import journal; print "OK"'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named systemd

[root@gw etc]# rpm -q systemd fail2ban
systemd-230-alt1.M80P.1
fail2ban-0.9.3-alt3

[root@gw etc]# cat /etc/fail2ban/jail.local 
[DEFAULT]
banaction = iptables-ipset-proto6
backend   = systemd

[sshd]
enabled   = yes

[sshd-ddos]
enabled   = yes

[recidive]
enabled   = yes
banaction = iptables-ipset-proto6-allports

В Сизифе с systemd-231 картина та же.
Comment 1 Вадим Илларионов 2016-10-08 10:42:17 MSK
Лечится установкой python-module-systemd.
Comment 2 Michael Shigorin 2016-10-08 13:07:15 MSK
Видимо, это следует учесть в пакете fail2ban (например, сделав метапакет).
Comment 3 Repository Robot 2016-12-05 11:38:18 MSK
fail2ban-0.9.5-alt2 -> sisyphus:

* Mon Dec 05 2016 Anton Farygin <rider@altlinux> 0.9.5-alt2
- removed iptables requires
- added requires to python-module-systemd (closes: #32592)