forked from wurzel/fruitbasket
ulimit: limit maximum number of processes per user
- Limits the number of processes a user can start to 2000 Mostly in place to prevent fork bombs taking down the host. - If anyone encounters problems with this number we can raise it
This commit is contained in:
parent
017a807a7c
commit
d611cc5a26
1 changed files with 9 additions and 0 deletions
|
@ -29,6 +29,15 @@
|
||||||
git
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# prevent fork bombs
|
||||||
|
security.pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = "@users";
|
||||||
|
item = "nproc";
|
||||||
|
type = "hard";
|
||||||
|
value = "2000";
|
||||||
|
}
|
||||||
|
];
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.settings.PermitRootLogin = "yes";
|
services.openssh.settings.PermitRootLogin = "yes";
|
||||||
|
|
Loading…
Add table
Reference in a new issue