All of lore.kernel.org
 help / color / mirror / Atom feed
* is there a way to discriminate the ESTABLISHED traffic?
@ 2005-04-04  2:51 Guido Lorenzutti
  2005-04-04  3:46 ` Grant Taylor
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Guido Lorenzutti @ 2005-04-04  2:51 UTC (permalink / raw)
  To: netfilter

How can i discriminate the traffic that my firewall is answering from a 
NEW request from a network from the ESTABLISHED traffic that my firewall 
is making from a NEW request from him?

In rules, to allow traffic TO my box from the lan 10.0.0.0/32

1 ipt -A INPUT -s 10.0.0.0/32 -m state --state NEW -j ACCEPT
2 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
3 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT

Now, to allow traffic FROM my box to the lan 10.0.0.0/32

4 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state NEW -j ACCEPT
5 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
6 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT

The 3 and 5 rules are exactly the same. Is there a way to discriminate 
this or the things are just like this and there is nothing to do about it?

Tnxs in advance.


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

* Re: is there a way to discriminate the ESTABLISHED traffic?
  2005-04-04  2:51 is there a way to discriminate the ESTABLISHED traffic? Guido Lorenzutti
@ 2005-04-04  3:46 ` Grant Taylor
  2005-04-04  8:17 ` John A. Sullivan III
  2005-04-04  9:00 ` Georgi Alexandrov
  2 siblings, 0 replies; 6+ messages in thread
From: Grant Taylor @ 2005-04-04  3:46 UTC (permalink / raw)
  To: Guido Lorenzutti; +Cc: netfilter

With out having a better explanation of what is going on (mach transcription) I'm going to stab in the dark here and think that you are looking for RELATED traffic as it is not established but it is not completely new either.



Grant. . . .

Guido Lorenzutti wrote:
> How can i discriminate the traffic that my firewall is answering from a 
> NEW request from a network from the ESTABLISHED traffic that my firewall 
> is making from a NEW request from him?
> 
> In rules, to allow traffic TO my box from the lan 10.0.0.0/32
> 
> 1 ipt -A INPUT -s 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 2 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 3 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 
> Now, to allow traffic FROM my box to the lan 10.0.0.0/32
> 
> 4 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 5 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 6 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 
> The 3 and 5 rules are exactly the same. Is there a way to discriminate 
> this or the things are just like this and there is nothing to do about it?
> 
> Tnxs in advance.
> 


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

* Re: is there a way to discriminate the ESTABLISHED traffic?
  2005-04-04  2:51 is there a way to discriminate the ESTABLISHED traffic? Guido Lorenzutti
  2005-04-04  3:46 ` Grant Taylor
@ 2005-04-04  8:17 ` John A. Sullivan III
  2005-04-04 13:10   ` Jozsef Kadlecsik
  2005-04-04  9:00 ` Georgi Alexandrov
  2 siblings, 1 reply; 6+ messages in thread
From: John A. Sullivan III @ 2005-04-04  8:17 UTC (permalink / raw)
  To: Guido Lorenzutti; +Cc: Netfilter users list

On Sun, 2005-04-03 at 23:51 -0300, Guido Lorenzutti wrote:
> How can i discriminate the traffic that my firewall is answering from a 
> NEW request from a network from the ESTABLISHED traffic that my firewall 
> is making from a NEW request from him?
> 
> In rules, to allow traffic TO my box from the lan 10.0.0.0/32
> 
> 1 ipt -A INPUT -s 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 2 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 3 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 
> Now, to allow traffic FROM my box to the lan 10.0.0.0/32
> 
> 4 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 5 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 6 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 
> The 3 and 5 rules are exactly the same. Is there a way to discriminate 
> this or the things are just like this and there is nothing to do about it?
> 
> Tnxs in advance.

If I understand you correctly, you are asking if you can distinguish
established traffic patterns recorded in the conntrack table depending
on whether the firewall initiated the session or was responding to some
other device.  I believe that once the traffic flow is being managed by
connection tracking, the packets never traverse the filter table.  Thus,
you cannot them there.

I suppose one could see them in the raw table but even then, it would be
difficult to distinguish after the SYN, SYN/ACK, SYN/ACK sequence for
TCP and even more so for UDP.  Why do you want to distinguish them?
Perhaps there is another way to achieve your goal? - John
-- 
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan@opensourcedevel.com

If you would like to participate in the development of an open source
enterprise class network security management system, please visit
http://iscs.sourceforge.net



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

* Re: is there a way to discriminate the ESTABLISHED traffic?
  2005-04-04  2:51 is there a way to discriminate the ESTABLISHED traffic? Guido Lorenzutti
  2005-04-04  3:46 ` Grant Taylor
  2005-04-04  8:17 ` John A. Sullivan III
@ 2005-04-04  9:00 ` Georgi Alexandrov
       [not found]   ` <425124D1.3080501@lorenzutti.com.ar>
  2 siblings, 1 reply; 6+ messages in thread
From: Georgi Alexandrov @ 2005-04-04  9:00 UTC (permalink / raw)
  To: netfilter

Guido Lorenzutti wrote:

> How can i discriminate the traffic that my firewall is answering from 
> a NEW request from a network from the ESTABLISHED traffic that my 
> firewall is making from a NEW request from him?
>
> In rules, to allow traffic TO my box from the lan 10.0.0.0/32
>
> 1 ipt -A INPUT -s 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 2 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 3 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>
> Now, to allow traffic FROM my box to the lan 10.0.0.0/32
>
> 4 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state NEW -j ACCEPT
> 5 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
> 6 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>
> The 3 and 5 rules are exactly the same. Is there a way to discriminate 
> this or the things are just like this and there is nothing to do about 
> it?
>
> Tnxs in advance.
>
>
btw 10.0.0.0/32 ?!


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

* Re: is there a way to discriminate the ESTABLISHED traffic?
       [not found]   ` <425124D1.3080501@lorenzutti.com.ar>
@ 2005-04-04 12:11     ` Georgi Alexandrov
  0 siblings, 0 replies; 6+ messages in thread
From: Georgi Alexandrov @ 2005-04-04 12:11 UTC (permalink / raw)
  To: netfilter

Guido Lorenzutti wrote:

> Georgi Alexandrov wrote:
>
>> Guido Lorenzutti wrote:
>>
>>> How can i discriminate the traffic that my firewall is answering 
>>> from a NEW request from a network from the ESTABLISHED traffic that 
>>> my firewall is making from a NEW request from him?
>>>
>>> In rules, to allow traffic TO my box from the lan 10.0.0.0/32
>>>
>>> 1 ipt -A INPUT -s 10.0.0.0/32 -m state --state NEW -j ACCEPT
>>> 2 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>>> 3 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>>>
>>> Now, to allow traffic FROM my box to the lan 10.0.0.0/32
>>>
>>> 4 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state NEW -j ACCEPT
>>> 5 ipt -A OUTPUT -d 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>>> 6 ipt -A INPUT -s 10.0.0.0/32 -m state --state ESTABLISHED -j ACCEPT
>>>
>>> The 3 and 5 rules are exactly the same. Is there a way to 
>>> discriminate this or the things are just like this and there is 
>>> nothing to do about it?
>>>
>>> Tnxs in advance.
>>>
>>>
>> btw 10.0.0.0/32 ?!
>>
>>
>
> Yeah.. what? I make my 10.0.0.0 subnet a class C :) It's Ok to do 
> that, try it!! :P
>
You probably mean 10.0.0.0/24 then ?

regards,
Georgi Alexandrov


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

* Re: is there a way to discriminate the ESTABLISHED traffic?
  2005-04-04  8:17 ` John A. Sullivan III
@ 2005-04-04 13:10   ` Jozsef Kadlecsik
  0 siblings, 0 replies; 6+ messages in thread
From: Jozsef Kadlecsik @ 2005-04-04 13:10 UTC (permalink / raw)
  To: John A. Sullivan III; +Cc: Netfilter users list

On Mon, 4 Apr 2005, John A. Sullivan III wrote:

> other device.  I believe that once the traffic flow is being managed by
> connection tracking, the packets never traverse the filter table.  Thus,
> you cannot them there.

s/filter/nat/, but there is no NAT involved in the question.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary


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

end of thread, other threads:[~2005-04-04 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-04  2:51 is there a way to discriminate the ESTABLISHED traffic? Guido Lorenzutti
2005-04-04  3:46 ` Grant Taylor
2005-04-04  8:17 ` John A. Sullivan III
2005-04-04 13:10   ` Jozsef Kadlecsik
2005-04-04  9:00 ` Georgi Alexandrov
     [not found]   ` <425124D1.3080501@lorenzutti.com.ar>
2005-04-04 12:11     ` Georgi Alexandrov

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.