Skip to content

Commit

Permalink
Add manager jail for fail2ban
Browse files Browse the repository at this point in the history
  • Loading branch information
asternic committed Jun 9, 2017
1 parent bc95fe1 commit ab82f3b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions setup/etc/fail2ban/filter.d/asterisk-ami.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Fail2Ban filter for asterisk AMI authentication failures
#

[INCLUDES]

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

[Definition]

_daemon = asterisk

__pid_re = (?:\[\d+\])

iso8601 = \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+[+-]\d{4}

# All Asterisk log messages begin like this:

log_prefix= (?:NOTICE|SECURITY|WARNING)%(__pid_re)s:?(?:\[C-[\da-f]*\])? [^:]+:\d*(?:(?: in)? \w+:)?
failregex = ^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s(?:\sHost)? <HOST> failed to authenticate

ignoreregex =

0 comments on commit ab82f3b

Please # to comment.