Firewall not Running

Firewall is not running!
File:/var/www/html/admin/modules/firewall/Attacks.class.php:17

i get this error when i click on Firewall > Status

fwconsole restart and fwconsole firewall start did not fix the error

this happen after updating to 13.0.49.2. how to fix this?

1 Like

Have you already tried to switch to module edge mode and update the firewall to the latest version?

Same issue. Switched to edge mode. I am on the latest.

Is iptables running:

service iptables status

tried edge mode and the one installed is the latest.

here is the result. i’ve been trying to start but the result is still the same.

The problem will PROBABLY be in /tmp/firewall.log - if you could paste a few lines from there, that would be great!

Hey Rob, here you go

Try `iptables -h' or 'iptables --help' for more information.
[root@freepbx ~]# Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s 1.2.2.ip/32                                                                                                                                                                              -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.2.1.1/3                                                                                                                                                                             2 -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
-bash: command substitution: line 1: unexpected EOF while looking for matching `''
-bash: command substitution: line 5: syntax error: unexpected end of file
-bash: Try: command not found
[root@freepbx ~]# 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.2.1.1/32 -                                                                                                                                                                             j fpbxknownreg
-bash: 1517779731:: command not found
[root@freepbx ~]# iptables v1.4.21: unknown option "-w5"
Bad argument `v1.4.21:'
Try `iptables -h' or 'iptables --help' for more information.
[root@freepbx ~]# Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.ip.169.ip/3                                                                                                                                                                             2 -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.167.ip.ip/32                                                                                                                                                                              -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
-bash: command substitution: line 1: unexpected EOF while looking for matching `''
-bash: command substitution: line 5: syntax error: unexpected end of file
-bash: Try: command not found
[root@freepbx ~]# 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.ip.25.ip/32                                                                                                                                                                              -j fpbxknownreg
-bash: 1517779731:: command not found
[root@freepbx ~]# iptables v1.4.21: unknown option "-w5"
Bad argument `v1.4.21:'
Try `iptables -h' or 'iptables --help' for more information.
[root@freepbx ~]# Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.ip.1.ip/3                                                                                                                                                                             2 -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
> 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.ip.ip.2/3                                                                                                                                                                             2 -j fpbxknownreg
> iptables v1.4.21: unknown option "-w5"
> Try `iptables -h' or 'iptables --help' for more information.
-bash: command substitution: line 1: unexpected EOF while looking for matching `''
-bash: command substitution: line 5: syntax error: unexpected end of file
-bash: Try: command not found
[root@freepbx ~]# 1517779731: /sbin/iptables -w5 -W10000 -A fpbxregistrations -s ip.ip.2.ip/32 -                                                                                                                                                                             j fpbxknownreg
-bash: 1517779731:: command not found
[root@freepbx ~]# iptables v1.4.21: unknown option "-w5"
Bad argument `v1.4.21:'
Try `iptables -h' or 'iptables --help' for more information.
[root@freepbx ~]# Try `iptables -h' or 'iptables --help' for more information.
> PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/admin/mod                                                                                                                                                                             ules/firewall/drivers/Iptables.class.php on line 828
> PHP Fatal error:  Uncaught exception 'Exception' with message 'Firewall is not r                                                                                                                                                                             unning!' in /var/www/html/admin/modules/firewall/Attacks.class.php:17
> Stack trace:
> #0 phar:///var/www/html/
> #1 phar:///var/www/html/admin/modules/
> #2 /var/www/html/admin/modules/firewall/hooks/voipfirewalld(3): include('phar://                                                                                                                                                                             /var/www...')
> #3 {main}
>   thrown in /var/www/html/admin/modules/firewall/Attacks.class.php on line 17

I am seeing the same error on a system I updated Friday. Have you seen found a fix for this yet?

iptables v1.4.21: unknown option “-w5”

Has anyone submitted a ticket on this. It’s clearly a bug.

1 Like

No, no-one has, and yes, it’s a bug. It means your system THINKS it’s running on a newer version of iptables than it is - it’s actuall checking PHP_VERSION, and only applying that if it’s running PHP 5.6 or higher.

So, my question is, why is your machine running a new version of PHP, but an old version of iptables? 8-\

1 Like

Turns out, this is because you DO have an ancient version of iptables, and to solve it you just need to run ‘yum update’.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.