Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Bastian Bittorf <bittorf@bluebottle.com>
To: f0rhum@free.fr
Cc: netfilter@vger.kernel.org
Subject: Re: What mean rules with no target? / counters
Date: Thu, 1 Oct 2015 06:34:32 +0200	[thread overview]
Message-ID: <20151001043431.GZ22537@medion.lan> (raw)
In-Reply-To: <134091077.84668710.1443648322962.JavaMail.root@zimbra62-e11.priv.proxad.net>

* f0rhum@free.fr <f0rhum@free.fr> [01.10.2015 06:11]:
> I read some relevant chapters of http://www.iptables.info but I could never find this.

a quick check in the documentation also makes me think,
this is missing or at least not explicitely mentioned.
I remember that i stumpled over this feature also by accident.

In short words: i you just want to count
bytes/packets and the packet should be processed further,
you omit the '-j TARGET' and so you just have a counter.
(most targets "eat" the packets, so they are not processed
in later rules)

# e.g.:
iptables -I INPUT -p udp --dport 53

lets you just count all incoming udp-DNS-packets.

bye, bastian

      reply	other threads:[~2015-10-01  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29  8:22 What mean rules with no target? f0rhum
2015-09-29 10:00 ` Bastian Bittorf
2015-09-30 21:25   ` f0rhum
2015-10-01  4:34     ` Bastian Bittorf [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=20151001043431.GZ22537@medion.lan \
    --to=bittorf@bluebottle.com \
    --cc=f0rhum@free.fr \
    --cc=netfilter@vger.kernel.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