Unwanted /var/log/asterisk/fail2ban log file

fail2ban is not installed, yet a /var/log/asterisk/fail2ban log file is being created and logged to.

The fail2ban entry in Log File Settings is enabled and cannot be disabled.

How does one disable this unwanted logging in FreePBX 15?

IMHO a very rash decision, I would have to ask you “WHY?” . . but if you insist, as root

cp -a /dev/null /var/log/asterisk/fail2ban

Will send all further intrusion attempts to the bitbucket.

There are no intrusion attempts (iptables is installed and working properly).

The log is filled with:

[2020-09-21 14:36:53] NOTICE[1162] loader.c: 311 modules will be loaded.
[2020-09-21 14:36:54] NOTICE[1162] res_odbc.c: Registered ODBC class ‘asteriskcdrdb’ dsn->[MySQL-asteriskcdrdb]
[2020-09-21 14:36:54] NOTICE[1162] cdr.c: Failed to process CDR configuration; using defaults
[2020-09-21 14:36:54] NOTICE[1162] cdr.c: CDR simple logging enabled.
[2020-09-21 14:36:54] WARNING[1162] presencestate.c: No provider found for label: CustomPresence
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘from-internal-xfer’ tries to include nonexistent context ‘from-internal-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘from-internal-noxfer’ tries to include nonexistent context ‘from-internal-noxfer-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘from-pstn’ tries to include nonexistent context ‘from-pstn-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘from-internal-noxfer-additional’ tries to include nonexistent context ‘from-internal-noxfer-additional-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘from-internal-additional’ tries to include nonexistent context ‘from-internal-additional-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-setrvol’ tries to include nonexistent context ‘dialparties-setrvol-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-finalbuild’ tries to include nonexistent context ‘dialparties-finalbuild-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-ringallv2’ tries to include nonexistent context ‘dialparties-ringallv2-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-checkblkvm’ tries to include nonexistent context ‘dialparties-checkblkvm-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-builddshunt-shuffle’ tries to include nonexistent context ‘dialparties-builddshunt-shuffle-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-builddshunt’ tries to include nonexistent context ‘dialparties-builddshunt-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-firstnotonphone’ tries to include nonexistent context ‘dialparties-firstnotonphone-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-call-trace’ tries to include nonexistent context ‘dialparties-call-trace-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-getdialstring’ tries to include nonexistent context ‘dialparties-getdialstring-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-checkcfextension’ tries to include nonexistent context ‘dialparties-checkcfextension-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-mainloop’ tries to include nonexistent context ‘dialparties-mainloop-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-isextavail’ tries to include nonexistent context ‘dialparties-isextavail-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-checkdndextensions’ tries to include nonexistent context ‘dialparties-checkdndextensions-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-checkcfextensions’ tries to include nonexistent context ‘dialparties-checkcfextensions-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-callscreencheck’ tries to include nonexistent context ‘dialparties-callscreencheck-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-preringprep’ tries to include nonexistent context ‘dialparties-preringprep-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-setmodes’ tries to include nonexistent context ‘dialparties-setmodes-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-setheader’ tries to include nonexistent context ‘dialparties-setheader-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-alertinfo’ tries to include nonexistent context ‘dialparties-alertinfo-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties-queuewait’ tries to include nonexistent context ‘dialparties-queuewait-custom’
[2020-09-21 14:36:54] WARNING[1162] pbx.c: Context ‘dialparties’ tries to include nonexistent context ‘dialparties-custom’

There will not be any intrusion attempts logged until some entity attempts an access. (Valid ones will pass !!)

If you don’t care, don’t read it or as suggested suppress it.

This file is generated by Asterisk by config done in System Admin. If fail2ban is running, it would be used for asterisk intrusion detection. Since it’s not running, it will not be used; just ignore it.

fail2ban is not installed and is not wanted.

/var/log/asterisk/fail2ban is being created by the FreePBX 15 logfiles module.

The FreePBX 15 logfiles module is also forcing a fail2ban entry in /etc/asterisk/logger_logfiles_additional.conf

FreePBX 15 logfiles settings won’t allow the fail2ban log to be disabled.

Deleting the fail2ban references from the FreePBX 15 logfiles module or removing the logfiles module entirely eliminates the unwanted /var/log/asterisk/fail2ban log file, but I’d rather not take such drastic measures.

You can find all the other files that might (quite needlessly) require your attention (drastic or otherwise) with

find / -mount -empty -type f

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