Proteggiamo asterisk 1.8 con fail2ban

Questo è il file da utilizzare per la corretta protezione di Asterisk 1.8. da parte di fail2ban.

# Fail2Ban configuration file
#
#
# $Revision: 250 $
#

[INCLUDES]

# Read common prefixes. If any customizations available -- read them from
# common.local
#before = common.conf


[Definition]

#_daemon = asterisk

# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P\S+)
# Values: TEXT
#

failregex = Registration from '.*' failed for '(:[0-9]{1,5})?' - Wrong password
Registration from '.*' failed for '(:[0-9]{1,5})?' - No matching peer found
Registration from '.*' failed for '(:[0-9]{1,5})?' - Device does not match ACL
Registration from '.*' failed for '(:[0-9]{1,5})?' - Username/auth name mismatch
Registration from '.*' failed for '(:[0-9]{1,5})?' - Peer is not supposed to register
NOTICE.* failed to authenticate as '.*'$
NOTICE.* .*: No registration for peer '.*' (from )
NOTICE.* .*: Host failed MD5 authentication for '.*' (.*)
VERBOSE.* logger.c: -- .*IP/-.* Playing 'ss-noservice' (language '.*')

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =


Procedura:
# cd /etc/fail2ban/filter.d
# wget http://pbxinaflash.net/source/fail2ban/asterisk18.conf
# mv asterisk.conf asterisk14.conf
# mv asterisk18.conf asterisk.conf
# service fail2ban restart

Migliora il tuo business. Partecipa ai nostri Corsi!

I nostri corsi OnLine ed in Aula sono studiati per garantire il miglior apprendimento e sono finalizzati a "creare professionisti nel settore".
Questi i prossimi corsi in calendario:

Corsi 2019

Corso Data Tipo