Pyxsoft Firewall

The free firewall for WHM, built on nftables.

A modern replacement for ConfigServer (CSF). Manage ports, allow and deny lists and login protection from WHM or from the pxf command line. Free, no license needed.

$ curl -s https://www.pyxsoft.com/extra/install-firewall | bash

For cPanel on RHEL-based servers: AlmaLinux, CloudLinux, Rocky Linux and RHEL 7 to 10.

Replace CSF in one command.

The installer takes care of the old firewall, so there is only one set of rules on the server.

  1. Removes CSF

    If ConfigServer (CSF) and LFD are installed, the installer disables and uninstalls them.

  2. Stops firewalld

    firewalld is stopped, disabled and masked, so only one firewall manages the rules.

  3. Installs pxf-cpanel

    The pxf service and the WHM plugin. The firewall starts disabled, with every port open.

  4. Enable it in test mode

    The first time you enable it, it turns itself off after 2 to 3 minutes unless you confirm. You can never lock yourself out.

Everything a hosting server needs from a firewall.

Clear controls in WHM for daily work, and a full command line for automation.

Native to WHM

Ports, allow and deny lists and settings in a WHM plugin that looks and works like the rest of WHM.

Built on nftables

A modern nftables core, with an iptables compatibility mode for older stacks.

Ports and presets

Open or close TCP and UDP ports and ranges, optionally per network. One preset sets up every cPanel port.

Allow and deny lists

Block a single address or a whole network, permanently or for a set time. Trusted hosts always get through.

Login failure guard

Watches failed logins and blocks the addresses behind them, with sensible defaults.

Hooks

Run your own scripts after every apply, for NAT rules or anything else. Only root-owned scripts are run.

FTP ready

Guides for the passive port range and FTPS, in WHM and on the command line.

Works with pxShield

Every apply keeps the redirects pxShield needs, so web traffic still goes through the WAF.

Script it with pxf.

Every action in WHM is also a pxf command, so you can roll the same setup across a fleet with Ansible or a shell loop. pxf verify checks that the rules on the server match what you asked for.

# Secure baseline with every cPanel port open
pxf preset cpanel

# Open a port for a web app, only from the office
pxf ports allow-port --port 8443 --proto tcp --cidr 203.0.113.0/24

# Block a network for one hour
pxf ip deny 198.51.100.0/24 --ttl 3600 --comment "scanner"

# Check the rules match the desired state
pxf verify

Install it now. It's free.

Run it as root on a cPanel server. If you get stuck, write to help@pyxsoft.com.

$ curl -s https://www.pyxsoft.com/extra/install-firewall | bash

Then open WHM, Plugins, Pyxsoft Firewall, check the allowed ports and enable it in test mode.