Control Web Panel

Security => CSF Firewall => Topic started by: rkhyd on August 27, 2021, 01:48:11 AM

Title: Firewall does not get enabled in CentOS8 install of CWP
Post by: rkhyd on August 27, 2021, 01:48:11 AM
I have installed CWP on CentOS8. The firewall is not getting enabled.
When i run the commands to enable from the terminal, i get below errors.
 
Code: [Select]
[root@server ~]# csf -x; csf -e
*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 /sbin/csf line 21.
BEGIN failed--compilation aborted at /sbin/csf line 21.
*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 /sbin/csf line 21.
BEGIN failed--compilation aborted at /sbin/csf line 21.
Any idea on how to fix them?
Cheers
Ravi Kumar
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: studio4host on August 27, 2021, 08:30:02 AM
you can try to check this or google more if that will not help
https://www.knot35.com/how-to-fix-error-the-path-to-iptables-is-either-not-set-or-incorrect-for-iptables-sbin-ip6tables/
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: Jeff on November 23, 2021, 01:20:37 PM
I have installed CWP on CentOS8. The firewall is not getting enabled.

It's because iptables isn't installed.

Just run this command:

Code: [Select]
yum install iptables
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: stevendove on March 07, 2025, 03:07:29 PM
I've installed iptables, and firewall wont enable
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: cyberspace on March 07, 2025, 05:44:59 PM
Do you get some errors ?
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: overseer on March 07, 2025, 09:20:42 PM
You will with CentOS 8 Stream. Better to ELevate to AlmaLinux or start fresh with AlmaLinux 8 or 9.
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: Starburst on March 09, 2025, 07:15:33 AM
What does line 21 and 26 say in /etc/csf/csf.conf?

CentOS 8 EOL happened long ago.
It's dead.

You want to run either AlmaLinux 8 or 9 for CWP.
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: JM_Stoorvogel on March 13, 2025, 01:51:55 PM
The same issues here on AlmaLinux 8. Had to manually install iptables and ConfigServer.

The anti spam measures on this forum have a higher quality than the product itself unfortunately...
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: JM_Stoorvogel on March 13, 2025, 01:58:33 PM
Nevermind.

Don't install firewalld or mask it.

install iptables and bind-tools and run csf -r
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: Starburst on March 14, 2025, 12:37:42 AM
If only someone posted (several times) a guide for AL8/9 that had all this...   ::)
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: Purelaise on March 14, 2025, 08:28:01 PM
If only someone posted (several times) a guide for AL8/9 that had all this...   ::)

Where is the guide please? Just ran a new install today and the Firewall is still disabled. Everything else is fine
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: overseer on March 14, 2025, 11:20:08 PM
https://forum.centos-webpanel.com/installation/server-under-al9/msg50121/#msg50121
 (https://forum.centos-webpanel.com/installation/server-under-al9/msg50121/#msg50121)https://forum.centos-webpanel.com/informations/tested-almalinux-9-4-beta-1-with-cwp-9-beta-0-9-8-1177/msg47238/#msg47238 (https://forum.centos-webpanel.com/informations/tested-almalinux-9-4-beta-1-with-cwp-9-beta-0-9-8-1177/msg47238/#msg47238)
https://forum.centos-webpanel.com/installation/cwp-fresh-install-on-almalinux-9-error-root-login/msg49594/#msg49594 (https://forum.centos-webpanel.com/installation/cwp-fresh-install-on-almalinux-9-error-root-login/msg49594/#msg49594)
Title: Re: Firewall does not get enabled in CentOS8 install of CWP
Post by: Starburst on March 15, 2025, 01:35:51 PM
@Purelaise if you still are having problems, Send me a PM, I can login after you do a fresh install of AL8 and get this setup for you.