From: Etienne Ledoux <etienne@unix.za.org>
To: netfilter@lists.netfilter.org
Subject: 3 iptables accounting questions
Date: Tue, 6 Jul 2004 10:17:43 +0200 [thread overview]
Message-ID: <200407061017.43252.etienne@unix.za.org> (raw)
Greetings,
1) I have a firewall and would like to count all the traffic entering/leaving
the external interface (I want to count only internet traffic, which is the
traffic entering/leaving the external if). Is this rule right ?
iptables -N ACCT
iptables -I FORWARD -j ACCT
iptables -I INPUT -j ACCT
iptables -I OUTPUT -j ACCT
iptables -A ACCT -s 10.168.0.2/32 -d 0.0.0.0/0 -o eth0
iptables -A ACCT -s 0.0.0.0/0 -d 10.168.0.2/32 -i eth0
10.168.0.2 is my external interface ip and is also the ip which my internal
network is natted behind.
2) I would like to save/restore only this accounting rule. I thought
'iptables-save -c -t ACCT' would work but it doesn't. 'iptables -L ACCT -n -v
-x' gives me the right counter values but how can I save and restore only my
accounting rule to prevent loosing the values after a reboot and I don't want
to save/restore all the accounting stats.
3) How do I flush the accounting stats.
I'm trying to count all traffic for a month and would then like to flush it at
the 1st of the next month, so I can start counting the new month. I'm stuck.
tx, in advance
e.
next reply other threads:[~2004-07-06 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-06 8:17 Etienne Ledoux [this message]
2004-07-06 8:45 ` 3 iptables accounting questions Antony Stone
2004-07-06 9:07 ` Etienne Ledoux
2004-07-06 21:55 ` Alexander Samad
2004-07-07 7:10 ` Etienne Ledoux
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=200407061017.43252.etienne@unix.za.org \
--to=etienne@unix.za.org \
--cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox