匿名

差分

SIP-Fail2ban

1,695 バイト追加, 2010年12月30日 (木) 09:40
Asterisk用の定義ファイルを作る
#
ignoreregex =
Asterisk 1.6とそれ以前の場合
# 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 "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex = Registration from '.*' failed for '<HOST>' - Wrong password
Registration from '.*' failed for '<HOST>' - No matching peer found
Registration from '.*' failed for '<HOST>' - Username/auth name mismatch
Registration from '.*' failed for '<HOST>' - Device does not match ACL
Registration from '.*' failed for '<HOST>' - Peer is not supposed to register
Registration from '.*' failed for '<HOST>' - Not a local domain
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
Asterisk 1.8とそれ以前ではログのホスト部分にポート番号を含む、含まないの違いがあるためfailregexの記述を変える必要がありますので注意してください。この部分に合致するメッセージが、ログファイルに現れたならばBAN基準になりますので注意して記述します。これ意外にも、引っかけたいメッセージがある場合にはそれも記述するとよいでしょう。<br>