All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Cannings <lists@edeca.net>
To: netfilter-devel@lists.netfilter.org
Subject: Unique IDs for rules?
Date: Mon, 19 Jan 2004 13:31:42 +0000	[thread overview]
Message-ID: <200401191331.42034.lists@edeca.net> (raw)

I've taken a look at the iptables manual page but can't seem to see 
anything that would suit what I want.  I have a number of rules that I 
grep for every five minutes, reading the packet/byte count then resetting 
their totals by using --replace and --set-counters.  At present, I know 
that these rules will always be the ones at the top of my INPUT chain, so 
I know their IDs will be 1, 2, 3 etc.

I want to do similar with other rules elsewhere in the chain but I can't 
be sure that they'll always be number 12, for example.  This makes 
grepping for them a little harder.  Would it be possible to have some 
sort of "comment" field for each rule so that some sort of token or 
unique ID for the rule could be inserted.  That way, it would simply be a 
case of "iptables -L -v | grep 'token'".  

Whether such an idea would add extra overhead to processing I don't know.  
I can also see that adding an extra column to the iptables output could 
be troublesome for those with scripts that rely on the present format but 
I'm sure it could be accomodated, somehow.

Thanks,

David

             reply	other threads:[~2004-01-19 13:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-19 13:31 David Cannings [this message]
2004-01-19 16:03 ` Unique IDs for rules? Henrik Nordstrom
2004-01-19 17:38   ` David Cannings
2004-01-19 17:52     ` Henrik Nordstrom
2004-01-19 18:04     ` Brad Fisher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401191331.42034.lists@edeca.net \
    --to=lists@edeca.net \
    --cc=david@edeca.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.