From: Nikolai Malykh <nmalykh@ieee.org>
To: netfilter-devel@lists.netfilter.org
Subject: tbf match submission
Date: Sat, 05 Feb 2005 22:53:09 +0300 [thread overview]
Message-ID: <42052425.8080009@ieee.org> (raw)
Hello all,
I would like to submit a new iptables match, developed by BiLiM Systems,
for inclusion into the main netfilter/iptables tree.
The new match is called "tbf" because it based on the TBF algoritm also
known as leaky Bucket. My work based on previous match limit, iplimit
and hashlimit. New match can works like hashlimit (all, srcip, dstip,
srcport, dstport modes) or like limit (nothing mode). Unlike limit and
hashlimit this match support inversion for whole iptable rule
(match/don't match).
New match allow to filter malicious traffic by one iptables line like:
iptables -A INPUT -p tcp -m tcp --dport smtp -m state --state NEW -m tbf
! --tbf 1/s --tbf-deep 1 --tbf-mode all --tbf-name SMTP
--tbf-htable-expire 360000 -j DROP
against many concurrent connections to SMTP from open relay (spam) or like:
iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m tbf !
--tbf 1/hour --tbf-deep 2 --tbf-mode all --tbf-name SSH
--tbf-htable-expire 360000 -j DROP
In nothing mode this match is equivalent to limit match (excluding
inversion support). You can check them by two rules like
-A INPUT -p udp -m udp --dport 9 -m limit --limit 1/min --limit-burst 3
-j LOG --log-prefix "LIMIT: "
-A INPUT -p udp -m udp --dport 9 -m tbf --tbf 1/d --tbf-deep 1
--tbf-name UDP --tbf-htable-expire 100000 --tbf-mode all -j LOG
--log-prefix "TBF-LIMIT: "
I have tried to get the patch into a format suitable for POM, using
> Rusty's NEWPATCHES guide.
You can download source code from
[http://www.nmalykh.org/work/tbf.tar.gz].
Any comments are very welcome.
Thank You
--
Nikolai Malykh
nmalykh@ieee.org
phone +7 (812) 449 0770
ICQ UIN 30741141
reply other threads:[~2005-02-05 19:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42052425.8080009@ieee.org \
--to=nmalykh@ieee.org \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.