All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torge Szczepanek <netfilter-devel@szczepanek.de>
To: netfilter-devel@lists.samba.org
Subject: iptables bad byte counter?!?
Date: 05 Jun 2002 21:07:35 +0200	[thread overview]
Message-ID: <1023304055.2845.69.camel@cygnus> (raw)

Hi!

I am using iptables 1.2.5 on SuSE 8.0 using the standard SuSE kernel
2.4.18-4GB, with some minor modifications (I increased the number of
maximum devices in net/core/dev.c, which is normally limited to 100). I
am accounting traffic using iptables [...] -n -v -x -Z. I am doing this
hourly.

Sometimes (once a day) iptables is reporting the wrong byte counter for
only some (about 10) ip adresses out of 400. 

All my users are on a vpn connection (poptop) server and I am setting up
a rule for every user by executing the following in my /etc/ppp/ip-up
script:

iptables -A TRAFFIC -i eth0 -o ppp+ -s ! x.y.0.0/16 -d $SUBNET/24 -j
TRAF$SUBNET
$IPTAB -A TRAF$SUBNET -d $5

(I only want to account incoming traffic, which is not comming from a
specific Class-B network). In my crontab I have a script, that is
dumping the iptables output to a file.

I am getting byte counters like this:

18446744073707058701

The byte counters differ (18446744073707 is mostly the same) so I think
this might be an overflow of a (longint?!?) counter.

The machine is under very heavy load, because it terminates more vpn
connections than planned. This does not happen on another machine, which
is under normal load. The other machine has EXACTLY the same setup as
the machine where I have these problems.

I am sorry that I cannot provide more detailed information about this
behaviour, since I can not play with my machine setup, because there are
about 2300 possible users, who would get very angry. :-]

Is this already known?!?

As a small bugfix I am now grepping out traffic, which has a byte
counter beginning with 184467440737. I am also writing on a trafficlog
daemon, which is doing the accounting using libipulog, which is very
more efficient, since I do not have to setup single rules for every user
and do not have to traverse many iptables chains for every packet (just
one single rule to log all traffic to userspace).

             reply	other threads:[~2002-06-05 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05 19:07 Torge Szczepanek [this message]
2002-06-05 19:29 ` iptables bad byte counter?!? Henrik Nordstrom
2002-06-06  5:42   ` Harald Welte
  -- strict thread matches above, loose matches on Subject: below --
2009-03-10  9:26 Erik Wasser
2009-03-10 10:30 ` G.W. Haywood
2009-03-10 14:30   ` Erik Wasser

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=1023304055.2845.69.camel@cygnus \
    --to=netfilter-devel@szczepanek.de \
    --cc=netfilter-devel@lists.samba.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.