netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Zagrabelny <mzagrabe@d.umn.edu>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter <netfilter@vger.kernel.org>
Subject: Re: counter target
Date: Thu, 31 Aug 2023 10:49:44 -0500	[thread overview]
Message-ID: <CAOLfK3XEZLpR8GUnZNTg+0rdGsJHs+Lr2_Ze1FA243UhnWDHKw@mail.gmail.com> (raw)
In-Reply-To: <ZPCye6qKuWeFAnCU@calendula>

On Thu, Aug 31, 2023 at 10:32 AM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> On Thu, Aug 31, 2023 at 10:25:15AM -0500, Matt Zagrabelny wrote:

> > Is there a way to count the packets that get evaluated by the default
> > policy of a chain?
> >
> > I know I can put a counter after all my rules, but it seems like it
> > would be nicer to somehow integrate it into:
> >
> > chain IN {
> >         type filter hook input priority filter; policy drop;
> >
> > for example:
> >
> > chain IN {
> >         type filter hook input priority filter; policy counter drop;
>
> Perhaps you mean something like this syntax:
>
>          type filter hook input priority filter; counter; policy drop;
>
> to enable basechain counters.
>
> No, this is not supported.
>
> > ...but the above fails.
>
> You have to place a counter after all your rules to count those that
> reach the basechain as you suggest.

Would netfilter-dev consider a feature request for adding a "counter"
option to the policy of section of a chain? Or has it already been
suggested and rejected?

Thank you for the dialogue!

-m

      reply	other threads:[~2023-08-31 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 21:06 counter target Matt Zagrabelny
2023-08-27 21:11 ` Pablo Neira Ayuso
2023-08-31 15:25   ` Matt Zagrabelny
2023-08-31 15:32     ` Pablo Neira Ayuso
2023-08-31 15:49       ` Matt Zagrabelny [this message]

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=CAOLfK3XEZLpR8GUnZNTg+0rdGsJHs+Lr2_Ze1FA243UhnWDHKw@mail.gmail.com \
    --to=mzagrabe@d.umn.edu \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).