mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-09-29 00:07:18 -05:00
update fail2ban
This commit is contained in:
parent
0d5e55f90a
commit
7d77335e21
1 changed files with 98 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue