* Why REJECT target is not supported with MANGLE ?
@ 2008-01-09 22:20 S?ébastien Cramatte
2008-01-10 8:46 ` Gáspár Lajos
2008-01-10 8:53 ` Michele Petrazzo - Unipex srl
0 siblings, 2 replies; 3+ messages in thread
From: S?ébastien Cramatte @ 2008-01-09 22:20 UTC (permalink / raw)
To: netfilter
Hello,
Why REJECT target is not supported with MANGLE ?
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 ?
Regards
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why REJECT target is not supported with MANGLE ?
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
1 sibling, 0 replies; 3+ messages in thread
From: Gáspár Lajos @ 2008-01-10 8:46 UTC (permalink / raw)
To: S?ébastien Cramatte; +Cc: netfilter
S?ébastien Cramatte írta:
> Hello,
>
> Why REJECT target is not supported with MANGLE ?
>
>
> 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 ?
I would drop those packets in a filter table...
INPUT/filter
OUTPUT/filter
FORWARD/filter
Is there any good reason not to do that?
Swifty
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why REJECT target is not supported with MANGLE ?
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
1 sibling, 0 replies; 3+ messages in thread
From: Michele Petrazzo - Unipex srl @ 2008-01-10 8:53 UTC (permalink / raw)
To: netfilter
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-10 8:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox