All of lore.kernel.org
 help / color / mirror / Atom feed
* Place for ipt_ACCOUNT/ipt_NETFLOW
@ 2011-02-03  8:50 Srinivasa T N
  2011-02-03 16:55 ` Bob Miller
  2011-02-03 20:18 ` Grant Taylor
  0 siblings, 2 replies; 8+ messages in thread
From: Srinivasa T N @ 2011-02-03  8:50 UTC (permalink / raw)
  To: Mail List - Netfilter

Hi All,
     Is it possible for me to place rules related to accounting after 
filter table in the INPUT chain so that the accounting takes place only 
on the packets I am accepting in my box?

Regards,
Seenu.

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-03  8:50 Place for ipt_ACCOUNT/ipt_NETFLOW Srinivasa T N
@ 2011-02-03 16:55 ` Bob Miller
  2011-02-04  5:25   ` Srinivasa T N
  2011-02-03 20:18 ` Grant Taylor
  1 sibling, 1 reply; 8+ messages in thread
From: Bob Miller @ 2011-02-03 16:55 UTC (permalink / raw)
  To: Srinivasa T N; +Cc: Mail List - Netfilter

On Thu, 2011-02-03 at 14:20 +0530, Srinivasa T N wrote:
> Hi All,
>      Is it possible for me to place rules related to accounting after 
> filter table in the INPUT chain so that the accounting takes place only 
> on the packets I am accepting in my box?

According to the nf-packet-flow diagram I have been referring too, the
INPUT chain on the filter table is the place to count packets destined
only for the box.
If that is not correct, I hope someone says so, because it would explain
some confusion I have been having lately...

> 
> Regards,
> Seenu.
> --
> 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

Bob Miller
334-7117/660-5315
http://computerisms.ca
bob@computerisms.ca
Network, Internet, Server,
and Open Source Solutions


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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-03  8:50 Place for ipt_ACCOUNT/ipt_NETFLOW Srinivasa T N
  2011-02-03 16:55 ` Bob Miller
@ 2011-02-03 20:18 ` Grant Taylor
  2011-02-04  5:22   ` Srinivasa T N
  1 sibling, 1 reply; 8+ messages in thread
From: Grant Taylor @ 2011-02-03 20:18 UTC (permalink / raw)
  To: Mail List - Netfilter

On 02/03/11 02:50, Srinivasa T N wrote:
> Is it possible for me to place rules related to accounting after filter
> table in the INPUT chain so that the accounting takes place only on the
> packets I am accepting in my box?

I hope I'm understanding you correctly.

It sounds like you are wanting to do your accounting after you filter 
out most of the chaff / noise / IBR that you don't want.  Correct?

If this is the case, why don't you have your filtering rules DROP / 
REJECT / otherwise discard the packets you don't want and then have a 
follow up rule that ACCEPTS the packet and do your accounting there?

At least if I understand you correctly, filtering packets before they 
hit your accounting rule should do what you are wanting.



Grant. . . .

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-03 20:18 ` Grant Taylor
@ 2011-02-04  5:22   ` Srinivasa T N
  2011-02-05  3:38     ` Grant Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Srinivasa T N @ 2011-02-04  5:22 UTC (permalink / raw)
  To: Mail List - Netfilter

On Friday 04 February 2011 01:48 AM, Grant Taylor wrote:
> On 02/03/11 02:50, Srinivasa T N wrote:
>> Is it possible for me to place rules related to accounting after filter
>> table in the INPUT chain so that the accounting takes place only on the
>> packets I am accepting in my box?
>
> I hope I'm understanding you correctly.
>
> It sounds like you are wanting to do your accounting after you filter
> out most of the chaff / noise / IBR that you don't want. Correct?

Yes, you are correct.
>
> If this is the case, why don't you have your filtering rules DROP /
> REJECT / otherwise discard the packets you don't want and then have a
> follow up rule that ACCEPTS the packet and do your accounting there?
>
> At least if I understand you correctly, filtering packets before they
> hit your accounting rule should do what you are wanting.
>
But adding rules to discard the unwanted traffic and then do an 
accounting for the rest of the packets in not a good idea.  I may not 
even know what type of packets may arrive and writing rules to discard 
each of unwanted packets is difficult.  So, I prefer to write rules to 
accept only the packets that are required and then drop the other 
packets.  I wanted to do the accounting only for packets that I accept.
>
>
> Grant. . . .
> --

Regards,
Seenu.

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-03 16:55 ` Bob Miller
@ 2011-02-04  5:25   ` Srinivasa T N
  0 siblings, 0 replies; 8+ messages in thread
From: Srinivasa T N @ 2011-02-04  5:25 UTC (permalink / raw)
  To: Mail List - Netfilter

On Thursday 03 February 2011 10:25 PM, Bob Miller wrote:
> On Thu, 2011-02-03 at 14:20 +0530, Srinivasa T N wrote:
>> Hi All,
>>       Is it possible for me to place rules related to accounting after
>> filter table in the INPUT chain so that the accounting takes place only
>> on the packets I am accepting in my box?
>
> According to the nf-packet-flow diagram I have been referring too, the
> INPUT chain on the filter table is the place to count packets destined
> only for the box.
> If that is not correct, I hope someone says so, because it would explain
> some confusion I have been having lately...
You are correct in saying that the packets destined for my box come in 
INPUT chain.  But, I will have the rules to filter out unwanted stuff in 
that table and do the accounting only for those packets which pass 
through these rules and reach upper layer.
>
>>
>> Regards,
>> Seenu.
>> --
>> 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
>
> Bob Miller
> 334-7117/660-5315
> http://computerisms.ca
> bob@computerisms.ca
> Network, Internet, Server,
> and Open Source Solutions
>
>
Regards,
Seenu.

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-04  5:22   ` Srinivasa T N
@ 2011-02-05  3:38     ` Grant Taylor
  2011-02-07  6:54       ` Srinivasa T N
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Taylor @ 2011-02-05  3:38 UTC (permalink / raw)
  To: Mail List - Netfilter

On 02/03/11 23:22, Srinivasa T N wrote:
> But adding rules to discard the unwanted traffic and then do an
> accounting for the rest of the packets in not a good idea. I may not
> even know what type of packets may arrive and writing rules to discard
> each of unwanted packets is difficult. So, I prefer to write rules to
> accept only the packets that are required and then drop the other
> packets. I wanted to do the accounting only for packets that I accept.

Do the accounting on the rules that you write to decide what traffic to 
accept.



Grant. . . .

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-05  3:38     ` Grant Taylor
@ 2011-02-07  6:54       ` Srinivasa T N
  2011-02-07 16:20         ` Grant Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Srinivasa T N @ 2011-02-07  6:54 UTC (permalink / raw)
  To: Mail List - Netfilter

On Saturday 05 February 2011 09:08 AM, Grant Taylor wrote:
> On 02/03/11 23:22, Srinivasa T N wrote:
>> But adding rules to discard the unwanted traffic and then do an
>> accounting for the rest of the packets in not a good idea. I may not
>> even know what type of packets may arrive and writing rules to discard
>> each of unwanted packets is difficult. So, I prefer to write rules to
>> accept only the packets that are required and then drop the other
>> packets. I wanted to do the accounting only for packets that I accept.
>
> Do the accounting on the rules that you write to decide what traffic to
> accept.
>
This will double the number of rules a packet has to traverse (One rule 
for accounting and one rule for accept).  Is there are other alternative?

Regards,
Seenu.

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

* Re: Place for ipt_ACCOUNT/ipt_NETFLOW
  2011-02-07  6:54       ` Srinivasa T N
@ 2011-02-07 16:20         ` Grant Taylor
  0 siblings, 0 replies; 8+ messages in thread
From: Grant Taylor @ 2011-02-07 16:20 UTC (permalink / raw)
  To: Mail List - Netfilter

On 02/07/11 00:54, Srinivasa T N wrote:
> This will double the number of rules a packet has to traverse (One rule
> for accounting and one rule for accept). Is there are other alternative?

I'd have to see an example of your rules to say for sure...

I'm using the counters of the number of packets / bytes that are matched 
by the rule for accounting.  I'm not adding any additional rules.

Further, you can engineer your rule structure so that the fewest rules / 
tests per rule are traverse by the largest number of packets.



Grant. . . .

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

end of thread, other threads:[~2011-02-07 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03  8:50 Place for ipt_ACCOUNT/ipt_NETFLOW Srinivasa T N
2011-02-03 16:55 ` Bob Miller
2011-02-04  5:25   ` Srinivasa T N
2011-02-03 20:18 ` Grant Taylor
2011-02-04  5:22   ` Srinivasa T N
2011-02-05  3:38     ` Grant Taylor
2011-02-07  6:54       ` Srinivasa T N
2011-02-07 16:20         ` Grant Taylor

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.