FAIL2BAN blocks access to “.ocdata” file!
Apache Error Log:
..AH01630: client denied by server configuration: ... cloud/data/.ocdata
create with a Custom Rule for FAIL2BAN do:
$sudo nano /etc/fail2ban/filter.d/apache-auth.local
insert:
[apache-auth] ignoreregex = nextcloud/data/.ocdata
do:
$sudo service fail2ban restart
Check Log:
tail -f n50 /var/log/apache2/error.log
Remark:
Sometimes the Login take long time after Enter the Password
this indicates a filled up “oc_bruteforce_attempts” Table!!
login into mysql:
$mysql -u user -p
select database:
USE Nextcloud;
show all values from the oc_bruteforce_attempts table, use:
SELECT * FROM oc_bruteforce_attempts;
remove “ALL” IP’s from the table, do step by step:
DELETE FROM oc_bruteforce_attempts WHERE IP="xxx.xxx.xxx.xxx";
Logout of mysql with exit..
Login into nextcloud as Admin and delete first the App Bruteforce Login cause FAIL2BAN works WITHOUT MYSQL!!