Prevent a fork bomb by limiting user process

fork bomb is a denial-of-service attack whereby a process continually replicates itself to deplete available system resources. It can be prevented by limiting user processes. Limiting user processes is important for running a stable system. To limit user process just add user name or group or all users to /etc/security/limits.conf file and impose process limitations. Understanding /etc/security/limits.conf file <domain> can be: an user name a group name, with @group syntax the wildcard *, for default entry the wildcard %, can be also used with %group syntax, for maxlogin limit <type> can have the two values: "soft" for enforcing the soft limits "hard" for enforcing hard limits <item> can be one of the following: core - limits the core file size (KB) <value> can be one of the following: core - limits the core file size (KB) data - max data size (KB) fsize - maximum filesize (KB) ...