From: Nikolai Malykh <nmalykh@ieee.org>
To: netfilter-devel@lists.netfilter.org
Subject: Updated source code for tbf match
Date: Mon, 29 Aug 2005 21:55:34 +0400 [thread overview]
Message-ID: <43134C16.6050308@ieee.org> (raw)
Updated source code for tbf match availiable at
http://www.nmalykh.org/work/tbf.tar.gz
new source code is compatible with new kernel 2.6.13
You can see short info about this match below
----------------------------------------------------
This adds an iptables match which allows you to create packet rate
threshold per any combination srcip, srcport, dstip, dstport. In
`nothing' mode this match works like `limit' match (excluding inversion
option supported tbf). In other modes tbf works like `hashlimit' match
(excluding inversion supported tbf).
Inversion flag allow you to change matching for whole iptables rule
(match/dont match).
Examples:
# allow up to 3 new SSH connections per hour for each client host. 4th
client per hour will be rejected with icmp-admin-prohibited message
iptables -A INPUT -p tcp --dport ssh -m state --state NEW -m tbf ! \
--tbf 3/h --tbf-deep 1 --tbf-mode srcip --tbf-name SSH -j REJECT \
--reject-with icmp-admin-prohibited
# Log up to 10 pps for your DNS servers per server address:
iptables -A INPUT -p udp --dport domain -m tbf --tbf 10 --tbf-deep 2 \
--tbf-mode dstip --tbf-name DNS -j LOG --log-prefix "IPTABLES-DNS: "
# Syn-flood attack protection per source
iptables -A INPUT -p tcp --syn -m tbf ! --tbf 10 --tbf-mode srcip \
--tbf-htable-name SYN -j DROP
# or drop scan packets from any source (like `limit')
iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m tbf \
! --tbf 1/s --tbf-burst 2 --tbf-mode nothing --tbf-name Scan -j DROP
--
Nikolai Malykh
nmalykh@ieee.org
phone +7 (812) 449 0770
ICQ UIN 30741141
reply other threads:[~2005-08-29 17:55 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=43134C16.6050308@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.