brute force protection - whitelist (proxy server for example)
I've tested the new brute force protection and I like it!
It would be useful if it is possible to define a whitelist (array in config). In my case all users access nextcloud via internal proxy. So the source address is always the same. If one user failes to login multiple times, all users are throttled for the next 12 hours (43200 seconds).
One question by the way: Who cleans up the bruteforce_attempts table?
cc @LukasReschke
In my case all users access nextcloud via internal proxy. So the source address is always the same. If one user failes to login multiple times, all users are throttled for the next 12 hours (43200 seconds).
Either disable the bruteforce protection (https://github.com/nextcloud/server/blob/c76dc835c4a1abc179bef3c469d837946fe4d339/config/config.sample.php#L210-L215) then or configure your reverse proxy properly to send the client address as header: https://github.com/nextcloud/server/blob/c76dc835c4a1abc179bef3c469d837946fe4d339/config/config.sample.php#L1196-L1214
One question by the way: Who cleans up the bruteforce_attempts table?
At the moment there is no cleanup.
@LukasReschke
Either disable the bruteforce protection (https://github.com/nextcloud/server/blob/c76dc835c4a1abc179bef3c469d837946fe4d339/config/config.sample.php#L210-L215) then
I hoped that I can replace fail2ban with built in brute force protection.
or configure your reverse proxy properly to send the client address as header: https://github.com/nextcloud/server/blob/c76dc835c4a1abc179bef3c469d837946fe4d339/config/config.sample.php#L1196-L1214
It's a normal proxy, no reverse proxy. All clients are using this proxy because there is no direct routed internet connection. For security reasons, this is no option.
@LukasReschke This is also what I said, that the penalty only should applied to failed logins and not to successful logins?
That's another question. Maybe this is for security reason? If it only throttles if login failes this would help, but I think a whitelist is a better option.
In our environment we have ~500 users and between 20 and 60 failed logins every day. So there is always a delay between 4 and 12 seconds.
Is a whitelist feature undesirable?
I tested the brute force protection with the beta 10 and got a similar problem. I changed my password, and while updating to the new password on all clients, there where so many wrong logins that the delay is so high, that the desktop sync client fails to login and reports a no connection error.
And because there is still one client on the old password and I don't have the time to figure out which one it is, the desktopsync is most of the time not working. An uggly workaround for my self is to delete the entries from the oc_bruteforce_attempts before syncing.
So maybe a whitlist for IP addresses, the delay only for failed logins or a system that old passwords are not counted as bruteforce attempt could be a fix for this.
the white list feature is coming in NC12 but does anybody know if it would work as an app in NC11 as well? https://apps.nextcloud.com/apps/bruteforcesettings
the white list feature is coming in NC12 but does anybody know if it would work as an app in NC11 as well?
Not supported nor tested in NC11.