Re: Dictionary-Attacken auf courier-mta
On Fri, 28 Sep 2007 11:47:17 +0200, Michelle Konzack
<linux4michelle@freenet.de> wrote:
>Nun ich würde gerne die anzahl der mislungenen Einlogversuche auf 10
>pro IP und Stunde begrenzen.
|def $SECONDS=600;
|def $HITCOUNT=5;
|def $LOGLIMIT="3/minute";
|def $LOGBURST=10;
|def $BLOCKSECONDS=600;
|
|table filter {
| chain INPUT {
| mod state state NEW proto tcp dport 22 subchain {
| # all new tcp connections to port 22
|
| # insert into recent table
| mod recent
| name sshratelimit set NOP;
|
| # if excessive, log and drop
| mod recent
| name sshratelimit update seconds $SECONDS hitcount $HITCOUNT subchain {
| mod hashlimit
| hashlimit $LOGLIMIT hashlimit-burst $LOGBURST
| hashlimit-mode srcip hashlimit-name sshratelimit1
| LOG log-prefix "sshratelimit1 ";
| DROP;
| }
| }
|
| # if a host has been recorded for excessive ssh connects, drop and
| # log everything from there
| mod recent
| name sshratelimit rcheck seconds $BLOCKSECONDS hitcount $HITCOUNT subchain {
| mod hashlimit
| hashlimit $LOGLIMIT hashlimit-burst $LOGBURST
| hashlimit-mode srcip hashlimit-name sshratelimit2
| LOG log-prefix "sshratelimit2 ";
| DROP;
| }
| }
|}
>Dazu sei gesagt das der Server über 17.000 Accounts hat und pro Tag so
>um die 1.7 millionen legitime sowie 4.8 millionen spam Mails bearbeitet
>wobei der SPAM seit einigen wochen drastisch zunimmt. (hat sich nahezu
>verdreifacht)
Du musst nicht bei jeder Anfängerfrage damit protzen, wie dick Deine
Systeme sind. Das ist lächerlich.
Die oben genannte iptables-Konfiguration läuft auf einem System mit
über fünf Accounts, das am Tag etwa 500 legitime Mails und 1500 Spams
bewegt.
Grüße
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
Reply to: