返回列表 發帖
可否举例写个例子出来?因为我vps中的freepbx刚装好个日就有人入侵,我都装左个fail2ban,但不懂setting

TOP

回復 8# 雯雯


  这个我有睇过  但是不太明白,因为我一装好fail2ban 目录中就有/etc/fail2ban/filter.d/asterisk.conf了
  1. # Fail2Ban configuration file
  2. #
  3. #
  4. # $Revision: 250 $
  5. #

  6. [INCLUDES]

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


  10. [Definition]

  11. #_daemon = asterisk

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

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

  28. # Option:  ignoreregex
  29. # Notes.:  regex to ignore. If this regex matches, the line is ignored.
  30. # Values:  TEXT
  31. #
  32. ignoreregex =
複製代碼

TOP

返回列表