Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom@ssji.net>2016-08-16 09:20:29 +0200
committerOlivier Mehani <shtrom@ssji.net>2016-08-16 09:20:29 +0200
commit26cdd9d53cd99573862d8d14f26cc2cf99d1aabd (patch)
tree1de11916e13e010c8cfd2b7c602dabc1b0c2b9df /openbsd
parent69c796255e377f3b77b7c74f5ee94105eb0ca2fa (diff)
fixup! [denyhost] Block obvious HTTP attacks, and simplify SSH logic
Diffstat (limited to 'openbsd')
-rwxr-xr-xopenbsd/denyhost.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd/denyhost.sh b/openbsd/denyhost.sh
index f95f119..8c757f7 100755
--- a/openbsd/denyhost.sh
+++ b/openbsd/denyhost.sh
@@ -131,7 +131,7 @@ grep etc.passwd /srv/www/logs/access_log | cut -d" " -f 2 | uniq >> ${NEW_BLOCKE
# SSH exploiters
sed -En "s/.*(Invalid user|Failed password).*from ([0-9.]+).*/\2/p" ${AUTHLOG} | \
sort | uniq -c | \
- sed "/^ *[1-$NUM_TRIES))] */d;s/.* //" \
+ sed "/^ *[1-$NUM_TRIES] */d;s/.* //" \
>> ${NEW_BLOCKERS_FILE}
pfctl -t kiddies -Tshow | sed "s/ //g" | sort -n > ${TMP_DIR}/blockers.list