To safeguard your data, stop illegal access, and guarantee reliable website performance, you must secure your server. WHM comes with several built-in technologies that help protect your server against frequent attacks. The most important WHM options you may set up to improve server security are described in this article.
Strengthen Password Policies
- Navigate to WHM > Security Center> Password Strength Configuration.

- For every user, set a strong minimum password strength (80 or higher is advised).
- Instruct users to use uppercase, lowercase, numeric, and symbolic characters to generate difficult passwords.

Brute-force attacks are less likely when password policies are tougher.
Enable Two-Factor Authentication (2FA)
- Navigate to WHM > Security Center > Two-Factor Authentication.

- Enable 2FA for WHM.
- It is recommended that all cPanel users enable two-factor authentication (2FA) for their accounts.

Configure Brute Force Protection (cPHulk)
- Go to WHM > Security Center > cPHulk Brute Force Protection.

- Turn on cPHulk.

- The Configuration Settings tab is the first one. You can monitor user account login attempts.

- To track logins from particular IP addresses, enable IP address-based Protection as shown below.

- The maximum number of failures per IP address in a single day can also be defined using the “One-day Blocks”.

- You can specify how long unsuccessful logins will be kept in the Login History section (in minutes).

- To be informed of logins and brute force users, you can configure notifications to send you an email.

- Using the second tab, “Whitelist Management” you can add trusted IP addresses to your whitelist.

This way, your server is protected from automated password-guessing attacks by cPHulk.
Restrict Root Access
- Navigate to WHM > Security Center > Manage Wheel Group Users.

- Remove users who should not have root-level (sudo) privileges.
- Only trusted administrators should have elevated access.

- Limit SSH Access: Use Host Access Control (WHM » Security Center » Host Access Control) to allow SSH access only from specific, trusted IPs.

Disable Unnecessary Features
Reducing unused services reduces a lot of potential areas of attack.
Turn off anonymous FTP.
- Navigate to WHM > Service Configuration > FTP Server Configuration.

- Select “No” to turn off anonymous FTP logins to stop illegal uploads.

Turn off shell access while not in use.
- Navigate to Account Functions in WHM. Manage Shell Access.
- Turn off SSH for those who do not require it.

Secure DNS and Email Services
1. Secure DNS Zones
Go to WHM » DNS Functions.
To avoid spoofing and incorrect setups, check and validate DNS zone entries.
2. Secure Email Routing
Email routing is set up for each cPanel account.
To prevent delivery problems or spoofing, select the appropriate routing option.
Keep Software Updated & Enable AutoSSL
Always run the latest version of WHM/cPanel to apply new security patches.
Enable AutoSSL
- Go to WHM » SSL/TLS » Manage AutoSSL.

- Enable AutoSSL to automatically install and renew SSL certificates for all domains.

SSL ensures encrypted communication between browsers and the server.
Enable PHP Security Controls
- Log in to WHM.
- Go to Home > Software > MultiPHP INI Editor.

- Click on Editor Mode.
- Select the PHP version for which you want to enable open_basedir.
- Scroll down and search for the open_basedir directive, which usually looks like:
;open_basedir =
- Remove the semicolon (;) to activate the directive.
- Set the recommended secure global path:
open_basedir = "/home/:/usr/lib/php:/usr/local/lib/php:/tmp/"This restricts PHP file access to:
- User home directories
- Essential PHP system directories
- Temporary directory
while blocking access to other server paths.
- Click Save to apply the configuration.

Use ModSecurity for Web Application Security
- Install and configure ModSecurity via WHM > Security Center > ModSecurity™ Vendors.

- Protect your server from web-based threats, such as SQL injections and cross-site scripting (XSS) attacks.
Monitor and Scan for Malware
- Go to WHM > Security Center > Security Advisor.

- Review the security warnings and recommendations.
- Apply the suggested fixes (updates, firewall settings, SSH hardening, etc.).
- Re-scan to confirm all issues are resolved.

Backup Regularly
- Set up automatic backups in WHM > Backup > Backup Configuration.

-
Enable and schedule automatic backups.

-
Store backups in a remote location if possible.
-
Backups ensure you can restore your data quickly in case of an attack or failure.
Best Practices for Server Security
- Restrict IP Access: Use Host Access Control to allow connections only from trusted IPs.
- Use Secure Protocols: Always access WHM and cPanel over HTTPS.
- Enable Firewall Protection: Use a firewall like CSF (ConfigServer Security & Firewall) for additional protection.
- Review Logs: Regularly monitor server logs for suspicious activities.
By following these steps, you can guarantee your server is protected from common vulnerabilities and threats.
If you are thinking about starting a website and searching for affordable hosting, be sure to visit our cPanel Hosting page.