GICT knowledge base
How to Enable Shell Fork Bomb Protection in WHM?
Published
Shell Fork Bomb Protection prevent Telnet/SSH users using all of the server resources and causing a system crash. Basically, it is a script that creates many processes very fast by using fork (). By doing this, they are able to prevent the system by filling up the process table to the point that you can’t even use “ps” in which you won’t be able to detect who did it.
1) Login to WHM.
2) Navigate to “Security Center”.
3) Click on “Shell Fork Bomb Protection” icon.
4) Click on “Enable Protection” button to enable this feature.
After you enabled the protection, the below limits are available to protect the server.
Limit Option Description
200000 -c Limits the maximum size of core files created.
200000 -d Limits the maximum size of a process’s data segment.
200000 -m Limits the maximum resident set size.
100 -n Limits the maximum number of open-file descriptors.
8192 -s Limits the maximum stack size.
35 -u Limits the maximum number of processes available to a single user.
200000 -v Limits the maximum amount of virtual memory available for the process.
Note: The “u” option limits bash shell users (default for cPanel users) to 35 processes each.
You can also do the same via command line.
1) Login to SSH via root.
2) Execute the below command to enable “Shell Fork Bomb Protection”.
perl -I/usr/local/cpanel -MCpanel::LoginProfile -le ‘print [Cpanel::LoginProfile::install_profile(‘limits’)]->[1];’
3) Then you need to restart cPanel service using the below command.
# service cpanel restart
4) You can also disable Shell Fork Bomb Protection by executing the below command.
perl -I/usr/local/cpanel -MCpanel::LoginProfile -le ‘print [Cpanel::LoginProfile::remove_profile(‘limits’)]->[1];’
5) Again need to restart the cPanel service.
# service cpanel restart
But we recommend you to enable this feature via WHM API.
If you need any further help please do reach our support department.
Related guides
How to Install and Uninstall JetBackup for cPanel
How to Install JetBackup for cPanel. JetBackup is one of the leading backup solutions for cPanel & WHM that offers a user-friendly GUI. It provides
WHMSetup SendGrid on your cPanel VPS/Server
Setup SendGrid on your cPanel VPS/Server. SendGrid provides a cloud-based service for reliable transactional and marketing email.
WHMChange cPanel Nameserver Software to PowerDNS Carefully
Review WHM nameserver selection, resolver dependencies, cluster compatibility and DNSSEC requirements before a planned PowerDNS service change.
WHMTroubleshooting Jailed Shell on OpenVZ
cPanel/WHM providing Jailed shell environment for users, this feature giving high-level security for users when doing ssh access to their server.



