mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 05:23:54 +00:00
sshd: disable trigger limit for systemd socket
When startWhenNeeded is enabled, a brute force attack on sshd will cause systemd to shut down the socket, locking out all SSH access to the machine. Setting TriggerLimitIntervalSec to 0 disables this behavior.
This commit is contained in:
parent
3858bd2817
commit
f5e0f2932e
@ -480,6 +480,8 @@ in
|
||||
else
|
||||
cfg.ports;
|
||||
socketConfig.Accept = true;
|
||||
# Prevent brute-force attacks from shutting down socket
|
||||
socketConfig.TriggerLimitIntervalSec = 0;
|
||||
};
|
||||
|
||||
services."sshd@" = service;
|
||||
|
Loading…
Reference in New Issue
Block a user