how to prevent fork bomb

To prevent fork bomb I followed this http://www.linuxhowtos.org/Tips%20and%20Tricks/ulimit.htm
ulimit -a reflects the new settings but when I run (as root in bash:(){ :|:&};: the VM still goes on max CPU+RAM and system will freeze.
How to ensure users will not be bring down the system by using fork bombs or running a buggy application?
OS: RHEL 6.4

To make this change pervasive you'll need to add these limits to the entire environment. Changes using the ulimit command are only to the current environment.
NOTE: This will have no effect on the root user!

Example

Edit this file: vi /etc/security/limits.conf and add entries to the file limiting the number of processes (nproc) that a specific user or group of users' is allowed to have.
vivek hard nproc 300
@student hard nproc 50
@faculty soft nproc 100
@pusers hard nproc 200

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all