# WHM Setup & Hardening

> A security and tuning pass on your cPanel & WHM server: SSH, firewall, cPHulk, ModSecurity, mail limits, PHP and MySQL.

One-time hardening of a cPanel & WHM server: access, firewall, cPHulk, ModSecurity, malware scanning, mail limits, PHP-FPM and MySQL tuning, with WHMCS provisioning still working.

- **Price:** Starting at $149
- **Billing:** One-time, fixed scope
- **Category:** Server Management
- **Quote turnaround:** Fixed-price quote within 24 hours
- **Start a project:** https://whmcspilot.com/start-project
- **Details:** https://whmcspilot.com/services/whmcs-whm-hardening
- **Last updated:** 2026-11-05

## Overview

WHM setup and hardening is a one-time security and tuning pass on a cPanel &amp; WHM server: SSH access, firewall, brute-force protection, ModSecurity, malware scanning, outbound mail limits and PHP and MySQL settings. It is for hosts whose server went live on installer defaults and now carries paying customers, including those whose WHMCS sits in a cPanel account on the same machine. Prices start at $149 per server.

Need cPanel installed and connected to WHMCS first? That is [cPanel installation and WHMCS integration](/services/whmcs-cpanel-installation). Protecting the WHMCS application itself (admin login, checkout, API) is [WHMCS firewall and brute-force protection](/services/whmcs-firewall), and a written review with severity ratings is the [WHMCS security audit](/services/whmcs-security-audit). If you would rather move billing off cPanel entirely, see [WHMCS server setup](/services/whmcs-server-setup).

## Where we start

We run WHM's Security Advisor and record what the server exposes: listening services, how root can log in, PHP versions past their end of life, and which accounts have shell access. That list becomes the before half of your handover report.

## Who can log in

- SSH keys for root and staff, with password logins turned off through the SSH Password Authorization Tweak
- Two-factor authentication for root and reseller WHM logins, with API requests exempted under Security Center » Configure Security Policies so WHMCS can still create and suspend accounts
- cPHulk Brute Force Protection tuned, with your office address and the WHMCS server added to its allow list. WHMCS lists brute-force blocks as a cause of cPanel module login failures, and a busy provisioning day should not lock billing out of its own server
- Host Access Control limiting WHM's port 2087 to fixed staff addresses where you have them

## Firewall after CSF

For years the default answer on cPanel was ConfigServer Security &amp; Firewall. ConfigServer closed on August 31, 2025 and released CSF under GPLv3, and community forks have carried it on since. We agree the route with you: a maintained CSF fork, the firewall in Imunify360 if you license it, or firewalld alongside cPHulk. Whichever you choose, the rules open only what customers use (web, mail, the cPanel, WHM and webmail ports, FTP if you sell it) and allow your WHMCS server through.

## Web and PHP

- ModSecurity with the OWASP Core Rule Set from WHM's ModSecurity Vendors page, and false positives on WordPress admin screens or your WHMCS checkout disabled rule by rule, never by switching the engine off
- PHP-FPM for accounts, end-of-life PHP versions removed or limited to the accounts that still need them, and disable\_functions set in MultiPHP INI Editor
- Shell Fork Bomb Protection, compilers restricted with Compiler Access, and jailed shells for customers who have SSH; CageFS as well if the server runs CloudLinux
- /tmp mounted noexec with cPanel's securetmp script
- Malware scanning with ImunifyAV, which is free in cPanel, or Imunify360 if you pay for it

## Outbound mail

A single hacked contact form can push enough spam through Exim to get the server's IP blocklisted, and then every customer's mail bounces. We turn on SMTP Restrictions so only the mail server sends, set Max hourly emails per domain and stop the nobody user from sending in Tweak Settings, confirm the hostname's PTR record, and fix SPF and DKIM through Email Deliverability.

## Database, backups and updates

- MySQL or MariaDB memory settings sized to the server, remote database access closed unless you need it, and the slow query log on
- WHM backups going to remote storage on a schedule, with one account restored as proof
- Update Preferences on an automatic tier you choose, and Contact Manager alerts sent to an inbox someone reads

## What you receive

A short report listing each finding, what we changed and anything we left alone on purpose, such as a module a customer depends on. Changes that restart Apache or Exim happen in a maintenance window you pick.

## What we need from you

- Root SSH and WHM access
- The IP addresses to allow: staff, the WHMCS server and any monitoring
- Licenses for Imunify360 or CloudLinux, if you want those used

## Pricing

ScopePriceOne cPanel &amp; WHM server, everything aboveFrom $149, one-timeServers with many sites needing ModSecurity exceptions, or a CloudLinux or Imunify360 rolloutFixed quote after scopingFurther servers, or follow-up changesQuoted per server, or $65 per hour

## Not included

- Cleaning a server that is already compromised, which starts with an investigation; our guide on [what to do when WHMCS is hacked](/blog/whmcs-hacked-what-to-do) covers the first hours
- Licenses for Imunify360, CloudLinux or LiteSpeed
- Round-the-clock monitoring and patching, available through monthly maintenance

Hardening a live server is done in small steps, each tested against a real customer site, so nothing you sell stops working while the defaults are replaced.

## What's included

- Security Advisor review with a before and after report
- SSH keys only, with password authentication disabled
- WHM two-factor authentication that still lets WHMCS provision
- cPHulk tuned with your staff and WHMCS server allow-listed
- Firewall on a maintained CSF fork, Imunify360 or firewalld
- ModSecurity with the OWASP Core Rule Set and per-rule exceptions
- PHP-FPM, end-of-life PHP removed, disable_functions and jailed shells
- Outbound mail limits, SMTP Restrictions, PTR, SPF and DKIM checks
- MySQL sized to the server and remote backups with a test restore
- Automatic cPanel updates and alerts to a monitored inbox

## Business outcomes

- Password-guessing bots stop reaching root and WHM
- One customer's hacked script is far less likely to blocklist the shared IP
- Security rules do not break WHMCS provisioning or customer checkouts
- You know which PHP versions and services are still exposed and why
- A failed disk or bad update can be recovered from remote backups

## Frequently asked questions

### Is CSF still safe to use on cPanel?

Only through a maintained fork. ConfigServer stopped maintaining CSF on August 31, 2025, so we use a community fork, Imunify360's firewall or firewalld, depending on what you prefer and license.

### Will enabling two-factor authentication in WHM break WHMCS?

It can, because the WHMCS cPanel module cannot answer a 2FA prompt. We keep 2FA on for people and exempt API requests in Configure Security Policies, which is the setting WHMCS documents.

### Will ModSecurity block my customers' sites?

Some rules will at first, usually on WordPress admin pages and form posts. We test real sites and disable specific rules by ID for the paths that need it, keeping the rest active.

### Do I need Imunify360?

No. ImunifyAV is free in cPanel and handles malware scanning; Imunify360 adds a firewall, intrusion detection and patching for a license fee, and is worth it on busy shared servers.

### Can you harden a server that already has customers on it?

Yes, that is most of our hardening work. Changes go in one at a time during a window you choose, with a customer site checked after each one.

### When is payment due?

Half when you approve the written quote and the balance when the report is delivered, by Stripe, PayPal or crypto through NOWPayments.
