Linux Netfilter discussions
 help / color / mirror / Atom feed
* Re: Reg Stateful firewall
@ 2007-11-28 15:49 Shyam Prasad
  2007-11-28 16:14 ` Preventing simple DoS attacks with ipt_recent on Kernel 2.6.9-42.ELsmp Shaun Mccullagh
  2007-11-28 16:21 ` Reg Stateful firewall Grant Taylor
  0 siblings, 2 replies; 4+ messages in thread
From: Shyam Prasad @ 2007-11-28 15:49 UTC (permalink / raw)
  To: Martijn Lievaart; +Cc: netfilter

But would it not be efficient if the firewall automatically allows such packets which were validated in INPUT.
that would save me lot of rules that might otherwise be necessary.


some linux based firewalls(not netfilter) do this automatically since they already know the state.


Regards,
Shyam

----- Original Message ----
From: Martijn Lievaart <m@rtij.nl>
To: Shyam Prasad <shyam@rocsys.com>
Cc: netfilter@vger.kernel.org
Sent: Wednesday, November 28, 2007 8:57:40 PM
Subject: Re: Reg Stateful firewall


<citaat van="Shyam Prasad">
> Hi,
> I have a doubt regarding statefull feature in iptables firewall
>
> In my iptables filter table i set the default policy for INPUT,OUTPUT
 and
> FORWARD as DROP.
> so all packets are dropped.
> now i added a policy
> iptables -A INPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT
>
> My assumption is that when an external device sends a  ping
> request(echo-request) its state will be NEW and it will be
 accepted,since
> for this a state table is being maintained,the ping reply should be
 sent
> through OUTPUT chain with out being blocked.but the packet is dropped
 in
> the OUTPUT chain.
>
> I understand that the rule we added is only for INPUT chain,but is a
 rule
> in OUTPUT chain required to send the reply packet out even for a
> legitimate packet that we accepted??

Yes, you must accept ESTABLISHED. For good measure accept RELATED as
 well.

-A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

HTH,
M4

-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-28 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 15:49 Reg Stateful firewall Shyam Prasad
2007-11-28 16:14 ` Preventing simple DoS attacks with ipt_recent on Kernel 2.6.9-42.ELsmp Shaun Mccullagh
2007-11-28 16:33   ` Grant Taylor
2007-11-28 16:21 ` Reg Stateful firewall Grant Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox