* REJECT as a default policy
@ 2010-01-11 12:02 Lars Nooden
2010-01-11 20:12 ` Gary Smith
2010-01-12 7:53 ` Mart Frauenlob
0 siblings, 2 replies; 8+ messages in thread
From: Lars Nooden @ 2010-01-11 12:02 UTC (permalink / raw)
To: netfilter
I'd like to add the ability to use the REJECT target as a default policy
to the netfilter / iptables wishlist.
Using REJECT as a default is currently possible as a kludge a few steps
would be saved by allowing it as a default policy. Perhaps that might
even speed up some filtering in some cases.
A good (IMHO) discussion of DROP vs REJECT has been written by Peter Benie :
http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject
Regards,
/Lars
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: REJECT as a default policy
2010-01-11 12:02 REJECT as a default policy Lars Nooden
@ 2010-01-11 20:12 ` Gary Smith
2010-01-11 22:08 ` Richard Horton
2010-01-12 7:53 ` Mart Frauenlob
1 sibling, 1 reply; 8+ messages in thread
From: Gary Smith @ 2010-01-11 20:12 UTC (permalink / raw)
To: 'Lars Nooden', 'netfilter@vger.kernel.org'
> I'd like to add the ability to use the REJECT target as a default policy
> to the netfilter / iptables wishlist.
>
> Using REJECT as a default is currently possible as a kludge a few steps
> would be saved by allowing it as a default policy. Perhaps that might
> even speed up some filtering in some cases.
>
> A good (IMHO) discussion of DROP vs REJECT has been written by Peter Benie :
> http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject
>
So change:
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
To:
:INPUT REJECT [0:0]
:FORWARD REJECT [0:0]
:OUTPUT REJECT [0:0]
I'm not really seeing the added value myself. I think it could have a negative benefit to many who use the chains and expect the default rule to be ACCEPT in order to fall through to the next rule.
Or am I not seeing your bigger picture of how REJECT would affect the sub chains?
Gary Smith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REJECT as a default policy
2010-01-11 20:12 ` Gary Smith
@ 2010-01-11 22:08 ` Richard Horton
2010-01-11 22:12 ` Gary Smith
2010-01-12 11:21 ` Lars Nooden
0 siblings, 2 replies; 8+ messages in thread
From: Richard Horton @ 2010-01-11 22:08 UTC (permalink / raw)
To: Gary Smith; +Cc: Lars Nooden, netfilter@vger.kernel.org
2010/1/11 Gary Smith <gary.smith@holdstead.com>:
> I'm not really seeing the added value myself. I think it could have a negative benefit to many who use the chains and expect the default rule to be ACCEPT in order to fall through to the next rule.
>
> Or am I not seeing your bigger picture of how REJECT would affect the sub chains?
I think all the OP means is DROP is valid policy target where as
REJECT isn't. The big problem though is that DROP / ACCEPT as policy
targets or jump targets require no options where as the REJECT target
can take options to control the returned ICMP code, which with the
current policy handler you couldn't specifiy.
--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: REJECT as a default policy
2010-01-11 22:08 ` Richard Horton
@ 2010-01-11 22:12 ` Gary Smith
2010-01-12 11:21 ` Lars Nooden
1 sibling, 0 replies; 8+ messages in thread
From: Gary Smith @ 2010-01-11 22:12 UTC (permalink / raw)
To: 'Richard Horton'
Cc: 'Lars Nooden', 'netfilter@vger.kernel.org'
> > Or am I not seeing your bigger picture of how REJECT would affect the sub
> chains?
>
> I think all the OP means is DROP is valid policy target where as
> REJECT isn't. The big problem though is that DROP / ACCEPT as policy
> targets or jump targets require no options where as the REJECT target
> can take options to control the returned ICMP code, which with the
> current policy handler you couldn't specifiy.
>
That makes a little more sense now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REJECT as a default policy
2010-01-11 12:02 REJECT as a default policy Lars Nooden
2010-01-11 20:12 ` Gary Smith
@ 2010-01-12 7:53 ` Mart Frauenlob
1 sibling, 0 replies; 8+ messages in thread
From: Mart Frauenlob @ 2010-01-12 7:53 UTC (permalink / raw)
To: netfilter; +Cc: Lars Nooden
On 11.01.2010 13:02, Lars Nooden wrote:
> I'd like to add the ability to use the REJECT target as a default policy
> to the netfilter / iptables wishlist.
>
> Using REJECT as a default is currently possible as a kludge a few steps
> would be saved by allowing it as a default policy. Perhaps that might
> even speed up some filtering in some cases.
>
> A good (IMHO) discussion of DROP vs REJECT has been written by Peter Benie :
> http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject
>
imagine you get scanned / ddosed / synflooded. For every invalid packet
coming in, you send out an icmp packet. Your host and line could get
quite busy with just sending irrelevant responses, making the dos attack
even more successful.
you will not have control over how many (limit) and what type of icmp
error is through'n out (would need new policy handler).
that's why i personally prefer to DROP to untrusted, while placing
REJECT rules with a limit before the drop-policy, to trusted sides.
regards
Mart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REJECT as a default policy
2010-01-11 22:08 ` Richard Horton
2010-01-11 22:12 ` Gary Smith
@ 2010-01-12 11:21 ` Lars Nooden
[not found] ` <4B4C7242.9070403@freemail.hu>
1 sibling, 1 reply; 8+ messages in thread
From: Lars Nooden @ 2010-01-12 11:21 UTC (permalink / raw)
Cc: netfilter@vger.kernel.org
Richard Horton wrote:
> I think all the OP means is DROP is valid policy target where as
> REJECT isn't.
Yes.
> The big problem though is that DROP / ACCEPT as policy
> targets or jump targets require no options where as the REJECT target
> can take options to control the returned ICMP code, which with the
> current policy handler you couldn't specifiy.
Ok. The limitation is a characteristic of the current policy handler,
so it's a non-trivial task to allow REJECT as a default policy.
Mart Frauenlob wrote:
> you will not have control over how many (limit) and what type of icmp
> error is through'n out (would need new policy handler).
Thanks, Mart and Richard. That answers a pair of question I was going
to ask but unsure of how to phrase.
/Lars
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REJECT as a default policy
[not found] ` <4B4C7242.9070403@freemail.hu>
@ 2010-01-12 13:31 ` Lars Nooden
2010-01-12 14:54 ` Mart Frauenlob
0 siblings, 1 reply; 8+ messages in thread
From: Lars Nooden @ 2010-01-12 13:31 UTC (permalink / raw)
Cc: netfilter@vger.kernel.org
Gáspár Lajos wrote:
> IMHO:
> I do not like to waste resources.
> An "unwanted/unallowed" incoming packet is already wasting time/bandwidth.
> A reply (ICMP or whatever else) to this makes you waste your precious
> resources.
> (Think about the ASYMMETRIC DSL)
Don't misunderstand the request. It is not a request to prohibit the
possibility of using DROP as the default policy for chain, but one of
*also* allowing use of REJECT as a default policy for a chain. It is
simply easiest, from a configuration standpoint, to set default with
a "-P"
There are times and conditions when DROP will be the appropriate
default, there are times and conditions when REJECT is the appropriate
default. Currently REJECT can be done by adding it to the end of a
chain, effectively making it default.
Regards
/Lars
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: REJECT as a default policy
2010-01-12 13:31 ` Lars Nooden
@ 2010-01-12 14:54 ` Mart Frauenlob
0 siblings, 0 replies; 8+ messages in thread
From: Mart Frauenlob @ 2010-01-12 14:54 UTC (permalink / raw)
To: netfilter
On 12.01.2010 14:31, Lars Nooden wrote:
> Gáspár Lajos wrote:
>> IMHO:
>> I do not like to waste resources.
>> An "unwanted/unallowed" incoming packet is already wasting time/bandwidth.
>> A reply (ICMP or whatever else) to this makes you waste your precious
>> resources.
>> (Think about the ASYMMETRIC DSL)
>
> Don't misunderstand the request. It is not a request to prohibit the
> possibility of using DROP as the default policy for chain, but one of
> *also* allowing use of REJECT as a default policy for a chain. It is
> simply easiest, from a configuration standpoint, to set default with
> a "-P"
>
> There are times and conditions when DROP will be the appropriate
> default, there are times and conditions when REJECT is the appropriate
> default. Currently REJECT can be done by adding it to the end of a
> chain, effectively making it default.
>
> Regards
> /Lars
well, if you write a new policy handler, i've got some feature requests :)
1: allow to set policies on custom (user created) chains (iptables -N
chain -P ACCEPT/DROP/REJECT).
2: for REJECT give ways to limit/hashlimit/recent match, with fallback
to DROP.
i.e. iptables -N foo -P REJECT --reject-with ... -m hashlimit ... -m
recent ... --policy-fallback DROP/DELUDE/TARPIT
oops, i've added DELUDE and TARPIT to the policy wishlist ;)
how about:
iptabes -N foo -P TARPIT -m hashlimit ... -m recent ...
--policy-fallback DROP
thanks a lot :))
regards
Mart
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-01-12 14:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 12:02 REJECT as a default policy Lars Nooden
2010-01-11 20:12 ` Gary Smith
2010-01-11 22:08 ` Richard Horton
2010-01-11 22:12 ` Gary Smith
2010-01-12 11:21 ` Lars Nooden
[not found] ` <4B4C7242.9070403@freemail.hu>
2010-01-12 13:31 ` Lars Nooden
2010-01-12 14:54 ` Mart Frauenlob
2010-01-12 7:53 ` Mart Frauenlob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox