All of lore.kernel.org
 help / color / mirror / Atom feed
* How to log NAT translations
@ 2010-09-14 17:24 Italo Valcy
  2010-09-14 17:54 ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Italo Valcy @ 2010-09-14 17:24 UTC (permalink / raw)
  To: netfilter

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys!

I'm a newbie in this mainling list, so I'm sorry if this question was
already asked.

I'd like to have more specific logging output of NAT translation in
iptables. Is there an way to logging of ORIGINAL_IP/ORIGINAL_PORT +
TRANSLATED_IP/TRANSLATED_PORT?

I know that I can put a logging rule before my NAT rule, but this way
I haven't the TRANS_IP/TRANS_PORT... for instance:

iptables -t nat -I POSTROUTING -s 10.0.0.0/24 -j SNAT --to 172.16.0.1
iptables -t nat -I POSTROUTING -s 10.0.0.0/24 -j LOG

In the above example I don't know how to get the TRANS_PORT...

I also know that we can access this information through
/proc/net/ip_conntrack (or using netstat-nat), but to get all
translation of a whole day its a big overhead to parse that file all
the time...

Thanks for any help!

- -- 
Saudações,

Italo Valcy :: http://wiki.dcc.ufba.br/~ItaloValcy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyPr98ACgkQfidLqjN6RNGWAgCgjLgYUkPiAEp+C2znpRqUskoU
FAQAoIeWZQEXFS9LY2RSnxlSKjrmtkNL
=WLWD
-----END PGP SIGNATURE-----


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

end of thread, other threads:[~2010-09-21 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14 17:24 How to log NAT translations Italo Valcy
2010-09-14 17:54 ` Jan Engelhardt
2010-09-21  2:25   ` Italo Valcy
2010-09-21  9:26     ` Jan Engelhardt
2010-09-21  9:45       ` Pablo Neira Ayuso
2010-09-21 10:22         ` Jozsef Kadlecsik

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.