* Policy for *nat*
@ 2005-02-17 17:51 Mohammad Khan
2005-02-17 18:48 ` Samuel Jean
0 siblings, 1 reply; 2+ messages in thread
From: Mohammad Khan @ 2005-02-17 17:51 UTC (permalink / raw)
To: 'netfilter'
Hello list:
What should be the policy for
PREROUTING
POSTROUTING
OUTPUT
chain in *nat* table?
And why?
Please explain.
Thanks
MOhammad
--
"Mad cow? You'd be mad too, if someone was trying to eat you."
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Policy for *nat*
2005-02-17 17:51 Policy for *nat* Mohammad Khan
@ 2005-02-17 18:48 ` Samuel Jean
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Jean @ 2005-02-17 18:48 UTC (permalink / raw)
To: Mohammad Khan; +Cc: netfilter
On Thu, February 17, 2005 12:51 pm, Mohammad Khan said:
> Hello list:
>
> What should be the policy for
> PREROUTING
> POSTROUTING
> OUTPUT
> chain in *nat* table?
First off, a default policy can only be ACCEPT or DROP.
This should all be ACCEPT.
> And why?
Because the NAT table is not meant for filtering.
The filter table provides the 3 necessary hook for
filtering purpose, INPUT--FORWARD--OUTPUT
Also, keep in mind that NAT table is traversed only
when there's no corresponding tuples in the conntrack.
i.e. only NEW unated packets get thru.
>
> Please explain.
I insist : keep filtering job in filter table. If you care about
duplicated rules in different chains, then create a custom chain
and call it from built-in chains.
One would also move incoming filtering to the mangle:PREROUTING hook.
Yes. It's feasable, but might break other things (ex.: NAT).
NAT is meant for NAT, not filtering.
MANGLE is meant for packet mangling, not filtering.
FILTER is meant for _filtering_ not NAT nor MANGLE'ing.
IMHO, the only chains that should contain DROP policy is filter's one.
>
>
> Thanks
> MOhammad
>
This is just my opinion - and the obvious way to see netfilter.
Because netfilter is permissive, one can do what netfilter was
not built for.
Best regards,
Samuel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-17 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-17 17:51 Policy for *nat* Mohammad Khan
2005-02-17 18:48 ` Samuel Jean
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.