Fail2ban not detecting Nextcloud logs #5939
-
I installed Nexcloud using the Docker AIO (not with a reverse proxy or behind a web server). I have attempted to configure Fail2ban based on the Nextcloud documentation. I tested the system by attempting to login with the incorrect password multiple times in a row. The failed login attempts are getting logged in the Nextcloud web UI, but no failed logins are detected by Fail2ban. In addition, the nextcloud.log file is empty. My Fail2ban files are below. nextcloud.local: nextcloud.conf: I may be overlooking something very simple, but I have verified the correct logpath and other file locations. Any help with this would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi, please compare your config with the official docs: https://github.com/nextcloud/all-in-one#fail2ban |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response and reference to the official docs. There must have been a copy/paste error with the nexcloud.conf file that I initially posted and the accurate file is below (there may still be a copy/paste error but the syntax of the file is correct on my system). I can't find any inaccuracies between these files and what is recommended in the documentation. I have also added 'logfilemode' => 0644, to the config.php file within the docker container and the loglevel is set to 2. Still, there are no logs in the nextcloud.log file on the host. After I attempt to login multiple times with the incorrect password, running fail2ban-client status nextcloud results in: If I have missed any additional details in the documentation I apologize. I am somewhat of a novice so any help on next steps is greatly appreciated. /etc/fail2ban/jail.d/nextcloud.local /etc/fail2ban/filter.d/nextcloud.conf |
Beta Was this translation helpful? Give feedback.
-
I got it working, thank you! I found the error in the logpath, fixed it and that's all it took. I had previously added 8443 to the nextcloud.local file and should have mentioned that initially. Thank you for walking me through this beginner mistake. |
Beta Was this translation helpful? Give feedback.
Hi, please compare your config with the official docs: https://github.com/nextcloud/all-in-one#fail2ban