Starting with FreePBX Firewall version 13.0.23.1 (with additional options added in ver. 13.0.43.1), the FreePBX Firewall has the following command line controls:

for help use: fwconsole firewall --help

[root@lgaetzdev2 ~]# fwconsole firewall --help
 ______             _____  ______   __
|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
 firewall [-f|--force] [-h|--help] cmd [opt] [ids1] ... [idsN]
Arguments:
 cmd                   Command to run (see --help)
 opt                   Optional parameter
 ids                   IDs to add or remove from a zone
Options:
 --force (-f)          Force Add/Removal of entry
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question
Help:
 Valid Commands:
 disable : Disable the System Firewall. This will shut it down cleanly.
 stop : Stop the System Firewall
 start : Start (and enable, if disabled) the System Firewall
 trust : Add the hostname or IP specified to the Trusted Zone
 untrust : Remove the hostname or IP specified from the Trusted Zone
 list [zone] : List all entries in zone 'zone'
 add [zone] [id id id..] : Add to 'zone' the IDs provided.
 del [zone] [id id id..] : Delete from 'zone' the IDs provided.
 When adding or deleting from a zone, one or many IDs may be provided.
 These may be IP addresses, hostnames, or networks.
 For example:
 fwconsole firewall add trusted 10.46.80.0/24 hostname.example.com 1.2.3.4

 

Firewall commands and usage examples: