Fwconsole firewall del blacklist not working

When trying to delete an entry from firewall blacklist, I get this error:

fwconsole firewall del blacklist 144.91.0.0/16
In DB_Helper.class.php line 145:
Can’t getConfig for null

I have verified that the IP address is in the blacklist zone using the command:
fwconsole firewall list blacklist

Any idea?

iptables -F will un-ban everyone. Just restart the firewall to rebuild iptables.

What version of FreePBX and Firewall are you using?

I can repro this, it’s the subnet mask that’s causing the issue:

# fwconsole firewall add blacklist 23.23.23.23
Attempting to add '23.23.23.23' to Blacklist ... Success!
# fwconsole firewall list blacklist
All blacklisted entries.
        23.23.23.23
# fwconsole firewall del blacklist 23.23.23.23
Removed 23.23.23.23 from Blacklist.

# fwconsole firewall add blacklist 23.23.23.0/24
Attempting to add '23.23.23.0/24' to Blacklist ... Success!
[[email protected] admin]# fwconsole firewall list blacklist
All blacklisted entries.
        23.23.23.0/24
# fwconsole firewall del blacklist 23.23.23.0/24

In DB_Helper.class.php line 145:

  Can't getConfig for null

Please file a bug at https://issues.freepbx.org/

Thanks Lorne, PitzKey and bksales!

As Lorne mentioned, the subnet mask is the issue.
This affects versions FreePBX 15 and 16

Here are my current versions:
PBX: 16.0.21.3 and 15.0.23.11
Asterisk: 16.25.3 and 16.24.1
System Firewall: 16.0.57.1 and 15.0.39

I’m filing a bug now.

1 Like