Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Rob Sterenborg" <rob@sterenborg.info>
To: netfilter@vger.kernel.org
Subject: RE: Rules For MailServer
Date: Mon, 4 Aug 2008 09:28:48 +0200	[thread overview]
Message-ID: <1CFE53EEA31442FC85BD82BF7044BAB3@dcyb.net> (raw)
In-Reply-To: <650807.79359.qm@web94006.mail.in2.yahoo.com>

> Yes, using RBLSMTPD there are zen,spamcop & another 2
> RBL sites i have been configured. even though the lots
> of unwanted connection is established...

Yes, well, you can rate-limit smtp connections, but since you probably can't
know where legitimate email comes from, you'll also be limiting legitimate
connections. However, maybe Qmail can rate-limit smtp connections too in a
nicer way (I don't know Qmail, but I know that Postfix has a "stress" config
these days).

You can try using the limit match:
$ipt -A INPUT -i eth1 -m state --state NEW -p tcp --dport 25 \
  -m limit --limit 1/second -j ACCEPT
$ipt -A INPUT -i eth1 -m state --state NEW -p tcp --dport 25 \
  -j REJECT

Or using the connlimit match:
$ipt -A INPUT -i eth1 -m state --state NEW -p tcp --dport 25 \
  -m connlimit --connlimit-above 2 -j REJECT

They do different things, but one of them may be useful for you.
See "man iptables".


Grts,
Rob

-- 
Disclaimer:
Any errors in spelling, tact or fact are transmission errors.



      reply	other threads:[~2008-08-04  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03 18:31 Rules For MailServer Tarak Ranjan
2008-08-04  4:05 ` Rob Sterenborg
2008-08-04  5:58   ` Tarak Ranjan
2008-08-04  7:28     ` Rob Sterenborg [this message]

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=1CFE53EEA31442FC85BD82BF7044BAB3@dcyb.net \
    --to=rob@sterenborg.info \
    --cc=netfilter@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox