Firewall module now needs to be enabled if sysadmin module is enabled?

I get a red error in CLI when restarting freepbx saying firewall needs to be installed and enabled. I don’t think it used to be required. At some point I think it was required to be installed but not enabled. Now apparently it needs to be enabled.

I am of the opinion that linking these two modules is a bad idea. I am personally not a fan of the firewall module. It is too opinionated imo, causes more problems than it prevents in my experience, harder to work with than just setting up iptables/firewalld myself. I would prefer it to be the way it was before, where it did not need to be enabled.

Firewall is not required for sysadmin.

This is what I get now on a fresh install when restarting Freepbx v15 with latest stable updates. I don’t recall seeing this error before.

 fwconsole restart
Running FreePBX shutdown...

Running Asterisk pre from Core module
Running Asterisk pre from Ucp module
Stopping UCP Node Server
[>---------------------------] < 1 sec
Stopped UCP Node Server
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] < 1 sec
Running FreePBX startup...
Running Asterisk pre from Sysadmin module
Running Sysadmin Hooks

Unable to locate the FreePBX BMO Class 'Firewall'A required module might be 
disabled or uninstalled. Recommended steps (run from the CLI): 
1) fwconsole ma install firewall 2) fwconsole ma enable firewall

Starting Asterisk...

I see the same. Not sure if this is just cosmetic or if a step is being skipped. I’ve opened a ticket.

This is because someone is calling

Firewall::fooFunction() without checking if firewall is installed.

If it is not required in module.xml there should be…

/** Used as an example to get a freepbx object **/
$FreePBX = FreePBX::Create();

if($FreePBX->Modules->checkStatus('firewall')) {
   $FreePBX->Firewall->doTheThing();
}

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