Bug 32592 - fail2ban не работает с бэкендом systemd
: fail2ban не работает с бэкендом systemd
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/fail2ban)
: unstable
: all Linux
: P3 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2016-10-08 09:58 by
Modified: 2016-12-05 11:38 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2016-10-08 09:58:52
В журнале такое:

окт 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 From 2016-10-08 10:42:17 -------
Лечится установкой python-module-systemd.
------- Comment #2 From 2016-10-08 13:07:15 -------
Видимо, это следует учесть в пакете fail2ban (например, сделав метапакет).
------- Comment #3 From 2016-12-05 11:38:18 -------
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)