New here and first time poster, hope you can point me in the correct direction with help on getting it configured and sorted.
I have recently installed nextcloud (manual install) on ubuntu server, all is configured and appears to be working fine, however I have installed fail2ban but struggling to configure it and get it running, can anyone please help and point me in the correct direction?
Using V28.2 of nextcloud.
I have managed to install fail2ban by doing the command: sudo apt install fail2ban
This installed without any issue but then when I tried to check the service status it wasnβt running and I didnβt understand the error or where to start troubleshooting.
Jan 31 09:58:16 DOMAIN systemd[1]: Started Fail2Ban Service.
Jan 31 09:58:16 DOMAIN fail2ban-server[2455]: ERROR: While reading from '/etc/fail2ban/fail2ban.local' [line 88]: section 'Definition' already exists
Jan 31 09:58:16 DOMAIN systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 31 09:58:16 DOMAIN systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Jan 31 10:04:34 DOMAIN systemd[1]: Started Fail2Ban Service.
Jan 31 10:04:34 DOMAIN fail2ban-server[2493]: ERROR: While reading from '/etc/fail2ban/fail2ban.local' [line 88]: section 'Definition' already exists
Jan 31 10:04:34 DOMAIN systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 31 10:04:34 DOMAIN systemd[1]: fail2ban.service: Failed with result 'exit-code'.
-- Boot 34703501791e4b95a202693e3eb1cb33 --
Jan 31 16:42:59 DOMAIN systemd[1]: Started Fail2Ban Service.
Jan 31 16:42:59 DOMAIN fail2ban-server[3015]: 2024-01-31 16:42:59,660 fail2ban [3015]: ERROR Failed during configuration: Have not fo>
Jan 31 16:42:59 DOMAIN fail2ban-server[3015]: 2024-01-31 16:42:59,660 fail2ban [3015]: ERROR Async configuration of server failed
Jan 31 16:42:59 DOMAIN systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 31 16:42:59 DOMAIN systemd[1]: fail2ban.service: Failed with result 'exit-code'.
~
~
~
~
~
~
~
~
~
lines 1-14/14 (END)
I have changed my domain name to just reflect DOMAIN in the output.
This doesnβt mean a great deal to myself, but hopefully will to you?!
Yes I did read the guide but it wasnβt as easy as just following itβ¦
I am using ubuntu server.
Iβve done the command and got the following out:
Subject: A start job for unit fail2ban.service has finished successfully
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ A start job for unit fail2ban.service has finished successfully.
ββ
ββ The job identifier is 2038.
Jan 31 16:42:59 DOMAIN fail2ban-server[3015]: 2024-01-31 16:42>
Jan 31 16:42:59 DOMAIN fail2ban-server[3015]: 2024-01-31 16:42>
Jan 31 16:42:59 DOMAIN systemd[1]: fail2ban.service: Main proc>
ββ Subject: Unit process exited
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ An ExecStart= process belonging to unit fail2ban.service has exited.
ββ
ββ The process' exit code is 'exited' and its exit status is 255.
Jan 31 16:42:59 DOMAIN systemd[1]: fail2ban.service: Failed wi>
ββ Subject: Unit failed
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ The unit fail2ban.service has entered the 'failed' state with result 'exit-c>
lines 49-71/71 (END)
Jan 31 10:04:34 DOMAIN fail2ban-server[2493]: ERROR: While reading from '/etc/fail2ban/fail2ban.local' [line 88]: section 'Definition' already exists
It seems that there are two [Definition] sections in the file /etc/fail2ban/fail2ban.local. The section on line 88 in the file probably already exists elswhere in the file. Did you create or change that file manually?