A
A
Alexey Tutubalin2019-04-26 10:02:18
Debian
Alexey Tutubalin, 2019-04-26 10:02:18

How to fix fail2ban v0.9.6?

Switched to a new server debian 9 c version 8, and immediately installed fail2ban from ISPmanager when trying to return my old rules

jail.conf

[apache-404]
enabled = true
port = http,https
filter = apache-404
logpath = /var/www/site.ru/data/logs/afisha.site.ru.access.log
bantime = 2592000
findtime = 600
maxretry = 10
[apache-access]
enabled = true
port = http,https
filter = apache-access
logpath = /var/www/site.ru/data/logs/site.ru.access.log
maxretry = 1
findtime = 86400
bantime = 2592000
[apache-access-a]
enabled = true
port = http,https
filter = apache-access-a
logpath = /var/www/site.ru/data/logs/afisha.site.ru.access.log
maxretry = 1
findtime = 86400
bantime = 2592000
[apache-error]
enabled = true
port = http,https
filter = apache-error
logpath = /var/www/site.ru/data/logs/site.ru.access.log
maxretry = 1
findtime = 86400
bantime = 1209600

fail2ban throws errors on restart
service fail2ban restart
Job for fail2ban.service failed because the control process exited with error code.
See "systemctl status fail2ban.service" and "journalctl -xe" for details.
systemctl status fail2ban.service
[email protected]:~# systemctl status fail2ban.service
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-04-26 09:52:43 MSK; 42s ago
Docs: man:fail2ban(1)
Process: 23788 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=0/SUCCESS)
Process: 25049 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
Main PID: 23452 (code=killed, signal=TERM)
Apr 26 09:52:43 sarov24 systemd[1]: Failed to start Fail2Ban Service.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Unit entered failed state.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Apr 26 09:52:43 sarov24 systemd[1]: Stopped Fail2Ban Service.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Start request repeated too quickly.
Apr 26 09:52:43 sarov24 systemd[1]: Failed to start Fail2Ban Service.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Unit entered failed state.
Apr 26 09:52:43 sarov24 systemd[1]: fail2ban.service: Failed with result 'exit-code'.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aborigen1020, 2019-04-26
@Kennius

Are you sure you moved filters from the old server?
For example, these:

apache-access-a
apache-404

Double-check the config for correctness, checking the relevance of filters and actions (although they are not listed here), the correctness of specifying log files for analysis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question