From: Anatoliy Lisjutin <SilverFox@rgantd.ru>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] Что сделать , что бы не ломились в закрытую дверь?
Date: Wed, 30 Nov 2005 23:08:01 +0300
Message-ID: <200511302308.01688.SilverFox@rgantd.ru> (raw)
In-Reply-To: <200511301737.44835.SilverFox@rgantd.ru>
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
В сообщении от 30 Ноябрь 2005 17:37 Anatoliy Lisjutin написал(a):
> awsecure
Ошибка вышла , сорри, rwsecure
Вот такой заработал. В аттаче.
А в родном параметры которые были у sed я вообще не понял..
А вообще эта задачка както по красивей не решается? В М2.4 для этого что
нибудь есть?
Вопрос остается.
--
System administrator RGANTD
Anatoliy Lisjutin
http://rgantd.ru http://rusarchives.ru http://victory.rusarchives.ru
SilverFox@rgantd.ru
[-- Attachment #2: rwsecure --]
[-- Type: text/plain, Size: 614 bytes --]
#
# rwsecure parses the /var/log/auth/all file for Invalid usernames or
# Failed password. If more than 3 invalid or failed attempts by one
# IP, it will add that IP to your /etc/hosts.deny file.
#
file=`awk '/Invalid|Failed password/' /var/log/auth/all | sed s/.*from./""/ | sed s/port.*/""/| awk '{print $1}' | sort | uniq -c | sort -n | awk '{if ($1>3){print $2}else{}}'`
for i in $file
do
x=`grep $i /etc/hosts.deny | sed 's/.#.*//'`
if [ "$x" ]
then
y=0
else
echo -en "ALL: "$i "\t# Added by rwsecure on "`date | awk '{print $2 " " $3 " " $4 " " $6}'`"\n" >> /etc/hosts.deny
fi
done
next prev parent reply other threads:[~2005-11-30 20:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 12:25 Anatoliy Lisjutin
2005-11-30 13:35 ` Anatoliy Lisjutin
2005-11-30 14:37 ` Anatoliy Lisjutin
2005-11-30 20:08 ` Anatoliy Lisjutin [this message]
2005-11-30 20:35 ` [Comm] Re: Что сделать, чтобы " Michael Shigorin
2005-11-30 23:27 ` Dmitry Lebkov
2005-12-01 0:30 ` Michael Shigorin
2005-12-01 9:16 ` [Comm] Что сделать , что бы " Anatoliy Lisjutin
2005-12-02 8:28 ` Anatoliy Lisjutin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511302308.01688.SilverFox@rgantd.ru \
--to=silverfox@rgantd.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git