Linode Forum
https://forum.linode.com/

Error installing Fail2Ban
https://forum.linode.com/viewtopic.php?f=19&t=11600
Page 1 of 1

Author:  bananacore [ Mon Feb 16, 2015 9:09 pm ]
Post subject:  Error installing Fail2Ban

Hi,

Not sure if this post goes here. I've trying to install Fail2Ban but for some reason I always get the same error. My Linode is a Centos 7 (a new Linode) and this is the output when I try to install Fail2Ban:

Code:
[root@localhost ~]# sudo service fail2ban restart
Redirecting to /bin/systemctl restart  fail2ban.service
Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details.

--------------------------------------------------

[root@localhost ~]# systemctl status fail2ban.service
fail2ban.service - Fail2Ban Service
   Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled)
   Active: failed (Result: start-limit) since Mon 2015-02-16 21:40:09 UTC; 30s ago
     Docs: man:fail2ban(1)
  Process: 30270 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)

Feb 16 21:40:08 localhost.localdomain systemd[1]: Failed to start Fail2Ban Service.
Feb 16 21:40:08 localhost.localdomain systemd[1]: Unit fail2ban.service entered failed state.
Feb 16 21:40:09 localhost.localdomain systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Stopping Fail2Ban Service...
Feb 16 21:40:09 localhost.localdomain systemd[1]: Starting Fail2Ban Service...
Feb 16 21:40:09 localhost.localdomain systemd[1]: fail2ban.service start request repeated too quickly, refusing to start.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Failed to start Fail2Ban Service.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Unit fail2ban.service entered failed state.

--------------------------------------------------

[root@localhost ~]# journalctl -xn
-- Logs begin at Mon 2015-02-16 16:49:32 UTC, end at Mon 2015-02-16 21:40:09 UTC. --
Feb 16 21:40:08 localhost.localdomain fail2ban-client[30270]: 'enabled = true\n'
Feb 16 21:40:08 localhost.localdomain systemd[1]: fail2ban.service: control process exited, code=exited status=255
Feb 16 21:40:08 localhost.localdomain systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fail2ban.service has failed.
--
-- The result is failed.
Feb 16 21:40:08 localhost.localdomain systemd[1]: Unit fail2ban.service entered failed state.
Feb 16 21:40:09 localhost.localdomain systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Stopping Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fail2ban.service has begun shutting down.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fail2ban.service has begun starting up.
Feb 16 21:40:09 localhost.localdomain systemd[1]: fail2ban.service start request repeated too quickly, refusing to start.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fail2ban.service has failed.
--
-- The result is failed.
Feb 16 21:40:09 localhost.localdomain systemd[1]: Unit fail2ban.service entered failed state.


Is there I'm doing wrong here? Thanks in advance!

Author:  Vance [ Wed Feb 18, 2015 10:01 pm ]
Post subject:  Re: Error installing Fail2Ban

Where are you installing fail2ban from? EPEL?

I know of one CentOS7 install where fail2ban from EPEL is working, but I wasn't the one to set it up so I don't know if any special fiddling was needed to make it start. I did have to manually fool with the bantime parameter.

Author:  bananacore [ Fri Mar 13, 2015 12:08 am ]
Post subject:  Re: Error installing Fail2Ban

It is weird, I tried all ways. Is there some final guide to install fail2ban in CentOS 7?

Author:  aunull [ Wed Mar 25, 2015 7:53 am ]
Post subject:  Re: Error installing Fail2Ban

Try this:

Code:
setenforce 0
service fail2ban start


What is the result of that?

Note, this will turn off SELinux until the system is rebooted, you could/should switch it back on after via
Code:
setenforce 1

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/