From: "Joao TERRA" <j_petrucci@terra.com.br>
To: netfilter@lists.netfilter.org
Subject: Re: bytes counting
Date: Fri, 23 Apr 2004 14:22:20 -0300 [thread overview]
Message-ID: <008501c42957$8b4895a0$6300a8c0@netsolutionsfort.com.br> (raw)
In-Reply-To: 086C43C9A9A1A541BFDFABCFDA05F58901448BAB@mailnew.tecnun.es
You can put the rule on:
#iptables -t mangle -I POSTROUTING -o INTERFACE_OF_192.168.0.50_SUBNET -d
192.168.0.50
then you can account in both directions separately
----- Original Message -----
From: "Arrizabalaga, Saioa" <sarrizabalaga@ceit.es>
To: <netfilter@lists.netfilter.org>
Sent: Friday, April 23, 2004 10:42 AM
Subject: bytes counting
Hello everyone,
I have been reading some mails in this listing and it is said the best
place to count bytes/packets is the mangle table, but I have a problem.
I have three network cards in my linux box: eth0 (private LAN), eth1
(private LAN) and eth2 (internet).
I would like to count the bytes/packets from/to 192.168.0.50 (it is in
eth0) that goes/comes to/from internet (eth2).
These are the rules I have:
iptables -A POSTROUTING -t mangle -o eth2 -s 192.168.0.50
With this rule I catch all the packets going from 192.168.0.50 to eth2,
but I know where to put the rule to catch the packets going from eth2 to
192.168.0.50, because as far as I can see it, when I put the rule:
iptables -A PREROUTING -t mangle -i eth2 -d 192.168.0.50 nothing is
caught because the packet has not been SNAT-ed yet. Am I wrong?
Any help would be appreciated.
Saioa Arrizabalaga
next prev parent reply other threads:[~2004-04-23 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 13:42 bytes counting Arrizabalaga, Saioa
2004-04-23 15:04 ` Antony Stone
2004-04-23 17:22 ` Joao TERRA [this message]
2004-04-23 17:54 ` Antony Stone
2004-04-23 20:13 ` Joao TERRA
2004-04-23 20:27 ` Antony Stone
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='008501c42957$8b4895a0$6300a8c0@netsolutionsfort.com.br' \
--to=j_petrucci@terra.com.br \
--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