All of lore.kernel.org
 help / color / mirror / Atom feed
* NAT POSTROUTING accounting
@ 2006-10-15 14:43 Kamal
  2006-10-15 18:09 ` Martijn Lievaart
  0 siblings, 1 reply; 7+ messages in thread
From: Kamal @ 2006-10-15 14:43 UTC (permalink / raw)
  To: netfilter

I have the following 2 rules:
 iptables -t nat -I POSTROUTING -o eth0 -p tcp --dport 80 -j SNAT --to
192.168.0.1
 iptables -t nat -I POSTROUTING -o eth0 -j SNAT --to  192.168.0.2

 How can I do accounting on TOTAL number of packets & bytes that pass
through both rules since the packets & bytes that appear when listing
the chain reflect the number of packets creating new connections & not
all the packets that are NAT'ed. Also you can't add a chain in front
of this chain since NAT POSTROUTING is the last chain in a packet
traversal:

 Chain POSTROUTING (policy ACCEPT 2593 packets, 1181K bytes)
  pkts bytes target     prot opt in     out     source               destination
  2259  114K SNAT       tcp  --  *      eth0     0.0.0.0/0
0.0.0.0/0           tcp dpt:80 to:192.168.0.1
  223K   15M SNAT       all  --  *      eth0    0.0.0.0/0
0.0.0.0/0           to:192.168.0.2


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

end of thread, other threads:[~2006-10-16 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-15 14:43 NAT POSTROUTING accounting Kamal
2006-10-15 18:09 ` Martijn Lievaart
2006-10-16 12:00   ` Kamal
2006-10-16 12:28     ` Gáspár Lajos
2006-10-16 13:22       ` Kamal
2006-10-16 14:03         ` Gáspár Lajos
2006-10-16 17:40           ` Kamal

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.