diff options
author | Olivier Mehani <shtrom@ssji.net> | 2016-08-16 09:20:29 +0200 |
---|---|---|
committer | Olivier Mehani <shtrom@ssji.net> | 2016-08-16 09:20:29 +0200 |
commit | 26cdd9d53cd99573862d8d14f26cc2cf99d1aabd (patch) | |
tree | 1de11916e13e010c8cfd2b7c602dabc1b0c2b9df | |
parent | 69c796255e377f3b77b7c74f5ee94105eb0ca2fa (diff) |
fixup! [denyhost] Block obvious HTTP attacks, and simplify SSH logic
-rwxr-xr-x | openbsd/denyhost.sh | 2 |
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 |