From: Michele Petrazzo - Unipex srl <michele.petrazzo@unipex.it>
To: netfilter@vger.kernel.org
Subject: Re: Why REJECT target is not supported with MANGLE ?
Date: Thu, 10 Jan 2008 09:53:45 +0100 [thread overview]
Message-ID: <4785DD19.5050605@unipex.it> (raw)
In-Reply-To: <478548BA.2020903@zensoluciones.com>
S?ébastien Cramatte wrote:
> Hello,
>
> Why REJECT target is not supported with MANGLE ?
>
>
I'm a iptables guru, but mangle it's there for "mangling packets", not
for filter them. filter tables are for that!
> My server is running debian etch4 with 2.6.22 kernel and setuped as
> traffic shaper + transparent bridge
>
> The command with connlimit bellow won't work and return me "Invalid
> Argument"
>
> iptables -t mangle -N mytable iptables --table mangle --append
> POSTROUTING --out-interface br0 --match physdev --physdev-is-bridged
> --physdev-out eth0 --jump mytable
>
> iptables -t mangle -A mytable --proto tcp --match connlimit
> --connlimit-above 15 --connlimit-mask 32 --jump REJECT iptables -t
> mangle -A mytable --jump CLASSIFY --set-class 1:10
>
> How can I achieve this kind of setup ?
>
DROP_MARK="0x10"
iptables -t mangle -N table_mark
iptables -t mangle -A mytable --proto tcp --match connlimit
--connlimit-above 15 --connlimit-mask 32 --jump table_mark
iptables -t mangle -A table_mark -j MARK --set-mark $DROP_MARK
iptables -t filter -m mark --mark $DROP_MARK -j REJECT
the "-t filter" parameter are optional, but I wrote it for say to you
that this is the right place where kernel make the filter!
http://www.faqs.org/docs/iptables/mangletable.html
Michele
prev parent reply other threads:[~2008-01-10 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 22:20 Why REJECT target is not supported with MANGLE ? S?ébastien Cramatte
2008-01-10 8:46 ` Gáspár Lajos
2008-01-10 8:53 ` Michele Petrazzo - Unipex srl [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=4785DD19.5050605@unipex.it \
--to=michele.petrazzo@unipex.it \
--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