Skip to contentSkip to conversation

Logging SNAT

DISCUSSION Pawel Oleksik 2 participants 3 messages Oct 3, 2005 – Oct 4, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I wonder if it is possible to log a SNAT activity in case when a translation is done from a network into a range of addresses. I'd like to get a log with fields:

<timestamp> <localnet address> uses external connection as <external IP>
....
<timestamp> <localnet address> releases <external IP>

Especially, I have no idea how to get the <external IP> (except parsing /proc/net/ip_conntrack).

p.o.

#1 lore raw
Quoted 6 lines · Pawel Oleksik

I wonder if it is possible to log a SNAT activity in case when a translation is done from a network into a range of addresses.

<timestamp> <localnet address> uses external connection as <external IP>
....
<timestamp> <localnet address> releases <external IP>

Some of this is provided by the newly released conntrack tool.

http://www.netfilter.org/news.html#2005-09-24

Regards
Henrik

#2 lore raw
Quoted 10 lines · Henrik Nordstrom
Quoted 3 lines

<timestamp> <localnet address> uses external connection as <external IP>
....
<timestamp> <localnet address> releases <external IP>

Some of this is provided by the newly released conntrack tool.

http://www.netfilter.org/news.html#2005-09-24

Regards
Henrik

Thanks!
According to the conntrack.8 it seems promising. However, are there any docs about what information I could get in event log?

p.o.