update fail2ban

This commit is contained in:
Daylin Morgan 2023-08-07 10:57:28 -05:00
parent 0d5e55f90a
commit 7d77335e21
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -26,20 +26,38 @@
};
services.resolved.enable = true;
services.fail2ban.enable = true;
# fail2ban config based on:
# https://www.linode.com/docs/guides/how-to-use-fail2ban-for-ssh-brute-force-protection/
services.fail2ban {
enable = true;
maxretry = 5;
bantime = "24h";
jails = {
sshd = ''
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
findtime = 300
bantime = 3600
ignoreip = 127.0.0.1
''
}
}
boot.kernelPackages = pkgs.linuxPackages_latest;
services.cron = {
enable = true;
systemCronJobs = [
# update repos
"0 * * * * make -C /home/daylin/git soft-repos"
# update container so home page is semi-accurate
"0 2 * * * make -C /home/daylin/git update-soft-serve"
];
};
# TODO: convert this to a systemd service/timer
# services.cron = {
# enable = true;
# systemCronJobs = [
# # update repos
# "0 * * * * make -C /home/daylin/git soft-repos"
# # update container so home page is semi-accurate
# "0 2 * * * make -C /home/daylin/git update-soft-serve"
# ];
# };
#
networking.hostName = "algiz";
# added to make using `pip install` work in docker build
@ -90,7 +108,7 @@
nixpkgs-fmt
lazydocker
python3
(python3.withPackages (ps: with ps; [ pip ]))
micromamba
nodejs