Cpanel Security

Configure a Firewall – Cpanel Security

26 Sep 2026 2 min read

A properly configured firewall is the backbone of server security. Learn how to set one up on a cPanel/WHM server to filter malicious traffic.

Why a Firewall Is Essential

A firewall acts as the gatekeeper between your server and the internet, allowing only intended traffic through while blocking everything else. Without one, every open port on your server is exposed to anyone who finds it, dramatically increasing your attack surface.

The Standard Choice for cPanel Servers

Most cPanel/WHM servers use ConfigServer Security & Firewall (CSF), a purpose-built firewall with tight WHM integration, brute-force detection, and easy rule management through a graphical interface.

How to Install and Configure CSF

  1. In WHM, go to Plugins > ConfigServer Security & Firewall (install it via WHM’s plugin manager if not already present).
  2. Review the default port list under Firewall Configuration and remove any ports your server doesn’t actually need open.
  3. Set TESTING mode to 0 only after confirming your configuration works, to avoid accidentally locking yourself out.
  4. Configure allow and deny lists for specific IP addresses as needed.
  5. Enable connection rate limiting to slow down scanning and brute-force attempts.

Ongoing Firewall Management

  • Review open ports quarterly and close anything no longer required.
  • Keep CSF itself updated, since firewall software also receives security patches.
  • Monitor the firewall’s block logs periodically to spot patterns of attempted attacks.

The Bigger Picture

A firewall doesn’t replace other security layers like strong passwords or 2FA — it works alongside them, filtering out a large volume of malicious traffic before it ever reaches your applications.

Get a free quote for your project.

Tell us your goal - a faster site, more leads, or a security check - and we will reply with a clear plan and price.

Achi Systems · Madonna House, Westlands, Nairobi

Reach us directly