Internal IP blocked - can't unblock - quite frustrating

Hi.

I’m at my wits end here. I accidentally blocked my internal ip address 192.168.1.104 from nextcloud.

I have searched through these forums and tried the following:

  1. mysql -e “use nextcloud;select * from oc_bruteforce_attempts;” – saw my ip in the results
  2. mysql -e “use nextcloud;delete from oc_bruteforce_attempts;”

Requeried using # 1 statement, and nothing is returned in the query. However, still cannot access the login screen.

Tried to access Nextcloud with my laptop with ip 192.168.1.156 and login screen appears and I can log in. Went to the bruteforce ip whitelist and added 192.168.1.0/24 range.

Tried with my other computer 192.168.1.157 and was able to login as well.

Still cannot access with 192.168.1.104.

rebooted server… still no go.

Something is wrong here. What must I do?

Thanks.
Chris.
Nextcloud vers: 25.0.4
PHP 8.1.16
mysql 10.5.18

hello @ckl_88 welcome to the forum :handshake:
Please use the search - lot of issues have been discussed already

in general you should not directly poke with the DB, better use official methods e.g. occ security:bruteforce:reset 192.168.1.104

I did use the search. That’s how I found the mysql commands.

for the occ command, the manual says I have to run it as the HTTP user. For my install, Debian/Ubuntu, the occ user is www-data. However, when I run it, I get this:

su -l www-data occ security:bruteforce:reset 192.168.1.104
This account is currently not available.

Chris.

should add php

su -l www-data php occ security:bruteforce:reset IP

On most Linux systems www-data account is blocked from login interactively (for good security reasons) but that restriction can be removed temporarily.

You can temporarily unblock an account by executing

usermod -s /bin/bash www-data

After the task is completed please revert the changes using

usermod -s /usr/sbin/nologin www-data

Thanks. I ended up installing the occ app and running the commands from there.

1 Like