Compare commits

..

1 Commits

Author SHA1 Message Date
5d3bbe99f3 chore: update compose submodule for traefik access logs 2026-05-01 03:33:34 +00:00
2 changed files with 29 additions and 33 deletions

View File

@@ -316,6 +316,7 @@
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowPing = true; allowPing = true;
defaultAllow = false;
# Only essential ports exposed to internet # Only essential ports exposed to internet
allowedTCPPorts = [ allowedTCPPorts = [
@@ -355,55 +356,50 @@
# Fail2ban - automatic IP banning # Fail2ban - automatic IP banning
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
maxretry = 3; maxRetry = 3;
bantime = "1h"; findtime = 600;
bantime = 3600;
banaction = "iptables-multiport"; banaction = "iptables-multiport";
jails = {
# Ban repeat offenders for 1 week # Ban repeat offenders for 1 week
recidive = { recidive = {
enabled = true; enabled = true;
filter = "recidive"; filter = "recidive";
settings = {
logpath = "/var/log/fail2ban.log"; logpath = "/var/log/fail2ban.log";
bantime = "1w"; bantime = 604800;
findtime = "1d"; findtime = 86400;
maxretry = 3; maxretry = 3;
}; };
};
jails = {
# SSH brute force protection # SSH brute force protection
sshd = { sshd = {
enabled = true; enabled = true;
settings = { filter = "sshd";
port = "2424"; port = "2424";
logpath = "/var/log/auth.log";
maxretry = 3; maxretry = 3;
bantime = "1h"; bantime = 3600;
};
}; };
# HTTP authentication failures # HTTP authentication failures
http-auth = { http-auth = {
enabled = true; enabled = true;
filter = "apache-auth"; filter = "apache-auth";
settings = {
port = "80,443"; port = "80,443";
logpath = "/var/log/traefik/access.log"; logpath = "/var/log/traefik/access.log";
maxretry = 5; maxretry = 5;
bantime = "1h"; bantime = 3600;
};
}; };
# HTTP scanning/attacks # HTTP scanning/attacks
http-botsearch = { http-botsearch = {
enabled = true; enabled = true;
filter = "apache-botsearch"; filter = "apache-botsearch";
settings = {
port = "80,443"; port = "80,443";
logpath = "/var/log/traefik/access.log"; logpath = [ "/var/log/traefik/access.log" ];
maxretry = 2; maxretry = 2;
bantime = "2h"; bantime = 7200;
};
}; };
}; };
}; };
@@ -474,7 +470,7 @@
}; };
# Audit logging # Audit logging
security.audit.enable = true; services.auditd.enable = true;
# Fail2ban log directory # Fail2ban log directory
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [