Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
f8654769
Commit
f8654769
authored
Oct 27, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fail2ban: add sshd rules
parent
aed4e58c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
sshd-ddos.conf
fail2ban/filter.d/sshd-ddos.conf
+23
-0
sshd.conf
fail2ban/filter.d/sshd.conf
+42
-0
No files found.
fail2ban/filter.d/sshd-ddos.conf
0 → 100644
View file @
f8654769
# Fail2Ban configuration file
#
# Author: Yaroslav Halchenko
#
# $Revision$
#
[
Definition
]
# 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>[\w\-.^_]+)
# Values: TEXT
#
failregex
=
sshd
(?:\[\
d
+\])?:
Did
not
receive
identification
string
from
<
HOST
>$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex
=
fail2ban/filter.d/sshd.conf
0 → 100644
View file @
f8654769
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
#
# $Revision$
#
[
INCLUDES
]
# Read common prefixes. If any customizations available -- read them from
# common.local
before
=
common
.
conf
[
Definition
]
_
daemon
=
sshd
# 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>[\w\-.^_]+)
# Values: TEXT
#
failregex
= ^%(
__
prefix_line
)
s
(?:
error
:
PAM
: )?
Authentication
failure
for
.*
from
<
HOST
>\
s
*$
^%(
__
prefix_line
)
s
(?:
error
:
PAM
: )?
User
not
known
to
the
underlying
authentication
module
for
.*
from
<
HOST
>\
s
*$
^%(
__
prefix_line
)
sFailed
(?:
password
|
publickey
)
for
.*
from
<
HOST
>(?:
port
\
d
*)?(?:
ssh
\
d
*)?\
s
*$
^%(
__
prefix_line
)
sROOT
LOGIN
REFUSED
.*
FROM
<
HOST
>\
s
*$
^%(
__
prefix_line
)
s
[
iI
](?:
llegal
|
nvalid
)
user
.*
from
<
HOST
>\
s
*$
^%(
__
prefix_line
)
sUser
.+
from
<
HOST
>
not
allowed
because
not
listed
in
AllowUsers
\
s
*$
^%(
__
prefix_line
)
sUser
.+
from
<
HOST
>
not
allowed
because
listed
in
DenyUsers
\
s
*$
^%(
__
prefix_line
)
s
(?:
pam_unix
\(
sshd
:
auth
\):\
s
)?
authentication
failure
;
logname
=\
S
*
uid
=\
S
*
euid
=\
S
*
tty
=\
S
*
ruser
=\
S
*
rhost
=<
HOST
>(?:\
s
+
user
=.*)?\
s
*$
^%(
__
prefix_line
)
srefused
connect
from
\
S
+ \(<
HOST
>\)\
s
*$
^%(
__
prefix_line
)
sAddress
<
HOST
> .*
POSSIBLE
BREAK
-
IN
ATTEMPT
!*\
s
*$
^%(
__
prefix_line
)
sUser
.+
from
<
HOST
>
not
allowed
because
none
of
user
'
s
groups
are
listed
in
AllowGroups
\
s
*$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex
=
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment