Error: The path to iptables is either not set or incorrect for IPTABLES trying to open Security -> Firewall

How to solve it? Error White Open Security → Firewall

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 26. Compilation failed in require at /usr/local/csf/lib/ConfigServer/DisplayUI.pm line 20. BEGIN failed–compilation aborted at /usr/local/csf/lib/ConfigServer/DisplayUI.pm line 20. Compilation failed in require at /usr/local/csf/bin/cyberpanel.pl line 14. BEGIN failed–compilation aborted at /usr/local/csf/bin/cyberpanel.pl line 14.

Welcome @arsabandung Happy you are here

Looks like exception errors in csf perl code not cyberpanel. The path for your iptables is wrong.

Seems this is not ubuntu 20/22 you need to set correct path from sbin/iptables to /usr/sbin/iptables

But to be sure see if path exist ls /sbin/iptables and also try ls /usr/sbin/iptables

If usr/sbin/iptables exists then you need to edit

$ nano /etc/csf/csf.conf

Find this line IPTABLES = and replace

IPTABLES = "/usr/sbin/iptables"
IPTABLES_SAVE = "/usr/sbin/iptables-save"
IPTABLES_RESTORE = "/usr/sbin/iptables-restore"
IP6TABLES = "/usr/sbin/ip6tables"
IP6TABLES_SAVE = "/usr/sbin/ip6tables-save"
IP6TABLES_RESTORE = "/usr/sbin/ip6tables-restore"