From: Italo Valcy <italo@dcc.ufba.br>
To: netfilter@vger.kernel.org
Subject: How to log NAT translations
Date: Tue, 14 Sep 2010 14:24:47 -0300 [thread overview]
Message-ID: <4C8FAFDF.9080201@dcc.ufba.br> (raw)
-----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-----
next reply other threads:[~2010-09-14 17:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 17:24 Italo Valcy [this message]
2010-09-14 17:54 ` How to log NAT translations 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
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=4C8FAFDF.9080201@dcc.ufba.br \
--to=italo@dcc.ufba.br \
--cc=netfilter@vger.kernel.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 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.