All of lore.kernel.org
 help / color / mirror / Atom feed
* accounting NAT-ed packets
@ 2004-12-19 10:12 Piotrek Kaczmarek
  2004-12-19 12:04 ` George Alexandru Dragoi
  2004-12-19 22:48 ` Piotrek Kaczmarek
  0 siblings, 2 replies; 3+ messages in thread
From: Piotrek Kaczmarek @ 2004-12-19 10:12 UTC (permalink / raw)
  To: netfilter

Hello,

I want to account all traffic from the address assigned to the linux box
(including NAT, locally generated traffic), but i can't. The rule
iptables -t mangle -A POSTROUTING -s 213.25.213.42
seems not to ,,catch'' NAT-ed packets, only locally generated traffic.

Is there any method to ,,catch'' packets after NAT with netfilter?

Best Regards,

-- 
Piotr Kaczmarek


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: accounting NAT-ed packets
  2004-12-19 10:12 accounting NAT-ed packets Piotrek Kaczmarek
@ 2004-12-19 12:04 ` George Alexandru Dragoi
  2004-12-19 22:48 ` Piotrek Kaczmarek
  1 sibling, 0 replies; 3+ messages in thread
From: George Alexandru Dragoi @ 2004-12-19 12:04 UTC (permalink / raw)
  To: Piotrek Kaczmarek; +Cc: netfilter

Yea, in mangle POSTROUTING, or in filter FORWARD the packets which are
going to be nat-ed. nat table counts only the first packet from a
stream


On Sun, 19 Dec 2004 11:12:57 +0100, Piotrek Kaczmarek
<kaczorek@k.daleka.net> wrote:
> Hello,
> 
> I want to account all traffic from the address assigned to the linux box
> (including NAT, locally generated traffic), but i can't. The rule
> iptables -t mangle -A POSTROUTING -s 213.25.213.42
> seems not to ,,catch'' NAT-ed packets, only locally generated traffic.
> 
> Is there any method to ,,catch'' packets after NAT with netfilter?
> 
> Best Regards,
> 
> --
> Piotr Kaczmarek
> 
> 


-- 
Bla bla


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: accounting NAT-ed packets
  2004-12-19 10:12 accounting NAT-ed packets Piotrek Kaczmarek
  2004-12-19 12:04 ` George Alexandru Dragoi
@ 2004-12-19 22:48 ` Piotrek Kaczmarek
  1 sibling, 0 replies; 3+ messages in thread
From: Piotrek Kaczmarek @ 2004-12-19 22:48 UTC (permalink / raw)
  To: netfilter; +Cc: netfilter-devel

On Sun, Dec 19, 2004 at 11:12:57AM +0100, Piotrek Kaczmarek wrote:
> Hello,
> 
> I want to account all traffic from the address assigned to the linux box
> (including NAT, locally generated traffic), but i can't. The rule
> iptables -t mangle -A POSTROUTING -s 213.25.213.42
> seems not to ,,catch'' NAT-ed packets, only locally generated traffic.
> 
> Is there any method to ,,catch'' packets after NAT with netfilter?

I've found a solution. I've added POSTROUTING chain to the raw table but with
higher priority than a nat table, so it is now possible to intercept
packets with nat-ed source addresses. You can download patch from
http://k.daleka.net/iptable_raw.patch

Could you consider applying this? I couldn't find other solution to do this.

-- 
Piotrek Kaczmarek


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-19 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-19 10:12 accounting NAT-ed packets Piotrek Kaczmarek
2004-12-19 12:04 ` George Alexandru Dragoi
2004-12-19 22:48 ` Piotrek Kaczmarek

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.