Skip to content

Commit

Permalink
update logpath
Browse files Browse the repository at this point in the history
  • Loading branch information
drizuid authored Oct 15, 2024
1 parent f33b053 commit 337fbe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
20 changes: 1 addition & 19 deletions filter.d/asterisk-security.conf
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
## Version 2024/10/15
# Fail2Ban filter configuration for Asterisk security
#

[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 "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#

failregex = SECURITY.* SecurityEvent="FailedACL".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
SECURITY.* SecurityEvent="InvalidAccountID".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
SECURITY.* SecurityEvent="ChallengeResponseFailed".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
SECURITY.* SecurityEvent="InvalidPassword".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
SECURITY.* SecurityEvent="FailedACL".*RemoteAddress=".+?/.+?/<HOST>/.+?".*


# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex = Asterisk GIT-master
ignoreregex = Asterisk GIT-master
2 changes: 1 addition & 1 deletion jail.d/asterisk-security.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ enabled = false
port = 5060,5061
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
logpath = /var/log/asterisk/security
logpath = %(remote_logs_path)s/asterisk/security

0 comments on commit 337fbe8

Please sign in to comment.