Compare commits

..

No commits in common. "c17489376e9940d80a6c62a4882687dcc813735a" and "1771fba57b5ced7e86070779fffd66aec08366b3" have entirely different histories.

4 changed files with 3 additions and 24 deletions

View File

@ -80,10 +80,6 @@
source = ../modules/services/server/fail2ban/filter/gitea.conf; source = ../modules/services/server/fail2ban/filter/gitea.conf;
mode = "0444"; mode = "0444";
}; };
"fail2ban/filter.d/nextcloud.conf" = {
source = ../modules/services/server/fail2ban/filter/nextcloud.conf;
mode = "0444";
};
}; };
systemPackages = with pkgs; [ # Default packages install system-wide systemPackages = with pkgs; [ # Default packages install system-wide
vim vim
@ -120,23 +116,16 @@
fail2ban = { fail2ban = {
enable = true; enable = true;
maxretry = 5; maxretry = 5;
extraSettings = {
findtime = "15m";
bantime = "1h";
};
jails = { jails = {
gitea = '' gitea = ''
enabled = true enabled = true
filter = gitea filter = gitea
backend = systemd backend = systemd
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports action = iptables-allports
''; '';
nextcloud = ''
backend = auto
enabled = true
filter = nextcloud
logpath = /var/lib/nextcloud/data/nextcloud.log
action = iptables-allports
}; };
}; };

View File

@ -1,5 +1,3 @@
[Definition] [Definition]
failregex = .*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST> failregex = .*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST>
ignoreregex = ignoreregex =
#journalmatch = _SYSTEMD_UNIT=gitea.servie
journalmatch =

View File

@ -1,6 +0,0 @@
[Definition]
_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*)
failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed:
^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Trusted domain error.
datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?"
journalmatch =

View File

@ -8,13 +8,11 @@
package = pkgs.nextcloud26; package = pkgs.nextcloud26;
enableBrokenCiphersForSSE = false; enableBrokenCiphersForSSE = false;
database.createLocally = false; database.createLocally = false;
logType = "file";
caching = { caching = {
redis = true; redis = true;
apcu = false; apcu = false;
}; };
extraOptions = { extraOptions = {
logfile = "nextcloud.log";
redis = { redis = {
host = "/run/redis-nextcloud/redis.sock"; host = "/run/redis-nextcloud/redis.sock";
port = 0; port = 0;