Основные команды fwconsole

Управление сервисами

fwconsole restart # Полный рестарт FreePBX + Asterisk
fwconsole start # Запуск
fwconsole stop # Остановка
fwconsole restart asterisk # Только Asterisk
 

Конфигурация и права

fwconsole reload # Применить изменения (аналог Apply Config в GUI)
fwconsole chown # Починить права на файлы (часто лечит GUI-ошибки)
fwconsole util tablefix # Проверить/починить таблицы БД FreePBX

Модули

fwconsole ma listonline # Список доступных модулей
fwconsole ma showupgrades # Что можно обновить
fwconsole ma upgradeall # Обновить все модули
fwconsole ma download <modulename> # Скачать модуль
fwconsole ma install <modulename> # Установить модуль
fwconsole ma delete <modulename> # Удалить модуль
 

Настройки и диагностика

fwconsole setting <ключ> <значение> # Задать системную настройку
fwconsole setting <ключ> # Показать значение настройки
fwconsole trunk list # Показать список транков
fwconsole trunk disable <id> # Выключить транк
fwconsole trunk enable <id> # Включить транк
fwconsole certificates --list # Список SSL-сертификатов

Бэкапы

fwconsole backup --list
fwconsole backup --backup=<ID>
fwconsole backup --restore=<файл>

Логи (важные пути на Debian)

/var/log/asterisk/full # Основной лог Asterisk
/var/log/asterisk/freepbx.log # Лог FreePBX
/var/log/asterisk/freepbx_debug.log # Расширенный лог FreePBX
/var/log/apache2/error.log # Ошибки веб-интерфейса

Самые частые «спасатели»

fwconsole chown
fwconsole restart
fwconsole ma upgradeall (это сомнительно)

FIREWALL

fwconsole firewall add blacklist 195.20.18.0/24

disable - This disables the FreePBX Firewall module, stops the service, and immediately flushes all iptables rules. Disable differs from stop in that the module stays disabled after a reboot. Note there is no corresponding enable command, use start instead.

Example

 
 
 
 
# fwconsole firewall start Enabling Firewall.   Broadcast message from <fqdn redacted> (Wed Apr 13 11:02:22 2016):
 
# fwconsole firewall restart
 
# fwconsole firewall lerules enable Lets Encrypt rules enabled successfully. Restarting Firewall... # fwconsole firewall lerules disable
 
# fwconsole firewall trust www.google.com Attempting to add www.google.com to Trusted Zone Success. Entry added to Trusted Zone.    # fwconsole firewall trust 192.168.0.1/24 Attempting to add 192.168.0.1/24 to Trusted Zone
 
# fwconsole firewall untrust www.google.com Attempting to remove www.google.com from Trusted Zone Success. Entry removed from Trusted Zone.   # fwconsole firewall untrust 192.168.0.1/24 Attempting to remove 192.168.0.1/24 from Trusted Zone
 
[root@lgaetzdev2 ~]# fwconsole firewall list blacklist All blacklisted entries.         8.8.8.8         google.com: (Resolves to 216.58.219.206)    [root@lgaetzdev2 ~]# fwconsole firewall list trusted All entries in zone 'trusted':         192.168.0.0/16         172.16.0.0/12         10.0.0.0/8         fc00::/8         fd00::/8
 
[root@lgaetzdev2 ~]# fwconsole firewall add blacklist example.com 192.168.15.0/24 Attempting to add 'example.com' to Blacklist ... Success! Attempting to add '192.168.15.0/24' to Blacklist ... Success!   [root@lgaetzdev2 ~]# fwconsole firewall add other 192.168.75.0/24
 
[root@lgaetzdev2 ~]# fwconsole firewall list other All entries in zone 'other':         192.168.75.0/24   [root@lgaetzdev2 ~]# fwconsole firewall del other 192.168.75.0/24 Attempting to remove 192.168.75.0/24 from 'other' Zone ... Success!   [root@lgaetzdev2 ~]# fwconsole firewall list other All entries in zone 'other':
  • # fwconsole firewall disable

     

  • stop - This temporarily stops the FreePBX Firewall until it is manually started or until the pbx is booted. All existing iptables rules are immediately flushed. 

    Example

     
  • # fwconsole firewall stop

     

  • start - This starts the FreePBX Firewall, enabling first if necessary

    Example

     
  • Firewall service now starting.
  • restart - Stops service if running and starts again

     
  • Enabling Firewall.
  • lerules - enables or disables the Lets Encrypt rules to allow inbound LE validation on port 80

     
  • Lets Encrypt rules disabled successfully. Restarting Firewall...
  • trust - Adds a host to the list of trusted networks shown on the zones, networks page

    Examples

     
  • Success. Entry added to Trusted Zone.

     

  • untrust - removes a host (if present) from the list of trusted networks shown on the zones, networks page

    Examples

     
  • Success. Entry removed from Trusted Zone.
  • list - list all hosts for a specified zone, acceptable zones are external, other, internal, trusted, and blacklist

    Examples

     
  •         127.0.0.1/32
  • add - add host(s) to specified zone, acceptable zones are external, other, internal, trusted, and blacklist, separate multiple hosts by spaces

    Examples

     
  • Attempting to add '192.168.75.0/24' to Zone 'other' ... Success!
  • del - delete host(s) from the specified zone, acceptable zones are external, other, internal, trusted, and blacklist, separate multiple hosts by spaces

    Examples

     

 

 

 

 

Метаданные статьи

Идентификатор статьи:
98
Категория:
Дата добавления:
2025-09-15 10:11:49

Связанные статьи