Advertisement
fame220

sshd.conf

Aug 7th, 2013
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.76 KB | None | 0 0
  1. s1 init.d # cat /etc/fail2ban/filter.d/sshd.conf
  2. # Fail2Ban configuration file
  3. #
  4. # Author: Cyril Jaquier
  5. #
  6. #
  7.  
  8. [INCLUDES]
  9.  
  10. # Read common prefixes. If any customizations available -- read them from
  11. # common.local
  12. before = common.conf
  13.  
  14.  
  15. [Definition]
  16.  
  17. _daemon = sshd
  18.  
  19. # Option:  failregex
  20. # Notes.:  regex to match the password failures messages in the logfile. The
  21. #          host must be matched by a group named "host". The tag "<HOST>" can
  22. #          be used for standard IP/hostname matching and is only an alias for
  23. #          (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
  24. # Values:  TEXT
  25. #
  26. failregex = ^%(__prefix_line)s(?:error: PAM: )?[aA]uthentication (?:failure|error) for .* from <HOST>( via \S+)?\s*$
  27.             ^%(__prefix_line)s(?:error: PAM: )?User not known to the underlying authentication module for .* from <HOST>\s*$
  28.             ^%(__prefix_line)sFailed \S+ for .* from <HOST>(?: port \d*)?(?: ssh\d*)?\s*$
  29.             ^%(__prefix_line)sROOT LOGIN REFUSED.* FROM <HOST>\s*$
  30.             ^%(__prefix_line)s[iI](?:llegal|nvalid) user .* from <HOST>\s*$
  31.             ^%(__prefix_line)sUser .+ from <HOST> not allowed because not listed in AllowUsers\s*$
  32.             ^%(__prefix_line)sUser .+ from <HOST> not allowed because listed in DenyUsers\s*$
  33.             ^%(__prefix_line)sUser .+ from <HOST> not allowed because not in any group\s*$
  34.             ^%(__prefix_line)srefused connect from \S+ \(<HOST>\)\s*$
  35.             ^%(__prefix_line)sUser .+ from <HOST> not allowed because a group is listed in DenyGroups\s*$
  36.             ^%(__prefix_line)sUser .+ from <HOST> not allowed because none of user's groups are listed in AllowGroups\s*$
  37.  
  38. # Option:  ignoreregex
  39. # Notes.:  regex to ignore. If this regex matches, the line is ignored.
  40. # Values:  TEXT
  41. #
  42. ignoreregex =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement