feat: enable fail2ban
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
49341364a8
commit
86347a68de
4 changed files with 72 additions and 6 deletions
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
systemd.network.networks."30-wan".addresses = [
|
||||
|
|
@ -23,6 +18,18 @@
|
|||
];
|
||||
};
|
||||
|
||||
services.fail2ban.jails = {
|
||||
# max 6 failures in 600 seconds
|
||||
"nginx-spam" = ''
|
||||
enabled = true
|
||||
filter = nginx-bruteforce
|
||||
logpath = /var/log/nginx/access.log
|
||||
backend = auto
|
||||
maxretry = 6
|
||||
findtime = 600
|
||||
'';
|
||||
};
|
||||
|
||||
services.namespaced-vpn = {
|
||||
enable = true;
|
||||
ips = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue