Control Web Panel

Security => CSF Firewall => Topic started by: gailclark80 on March 17, 2026, 02:41:19 AM

Title: Cannot enable Firewall
Post by: gailclark80 on March 17, 2026, 02:41:19 AM
I ran [root@server ~]# csf -e
and it shows the following error

Error* The path to iptables is either not set or incorrect for IPTABLES [/sbin/iptables] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/URLGet.pm line 39.
Compilation failed in require at /usr/sbin/csf line 34.
BEGIN failed--compilation aborted at /usr/sbin/csf line 34.

How should I fix it?
Title: Re: Cannot enable Firewall
Post by: Starburst on March 17, 2026, 10:53:10 PM
Please advise the following:

What distro are you running CWP on?

New or Existing installation?

What csf version? [csf -v]
Title: Re: Cannot enable Firewall
Post by: darthvaper on May 31, 2026, 11:06:16 AM
Getting the exact same error on a fresh install, almalinux9
Title: Re: Cannot enable Firewall
Post by: overseer on May 31, 2026, 02:41:44 PM
How did you install? Here is Starburst's recommended install method (using the DVD distribution, not minimal):
Quote from: Starburst on April 18, 2025, 12:45:19 AM
These are the first steps we do with AL9 servers, should work on AL8, but not guaranteed, as I mentioned this is AL9.

dnf update ca-certificates

dnf install dnf-plugins-core

dnf install elrepo-release epel-release -y

dnf config-manager --set-enabled crb
That is the new Power Tools for EL9.

dnf --refresh update

dnf install nano wget ipset ebtables iptables ipset-service uuid uuid-devel libuuid-devel m4 pcre pcre-devel zlib-devel perl-DBD-MySQL perl-IPC-Cmd perl-Pod-Html perl-Sys-Hostname perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph libtool s-nail htop sysstat python3-perf nmap net-tools make quota cockpit* -y

dnf install clamav* clamd

Then proceed to install CWP per their instructions.