Iptables NAT logging

Posted by Gerard on Server Fault See other posts from Server Fault or by Gerard
Published on 2010-02-23T01:36:55Z Indexed on 2010/03/27 14:03 UTC
Read the original article Hit count: 251

Filed under:
|
|

I have a box setup as a router using Iptables (masquerade), logging all network traffic.

The problem:

Connections from LAN IPs to WAN show fine, i.e. SRC=192.168.32.10 -> DST=60.242.67.190

but for traffic coming from WAN to LAN it will show the WAN IP as the source, but the routers IP as the destination, then the router -> LAN IP.

I.e. SRC=60.242.67.190 -> DST=192.168.32.199 SRC=192.168.32.199(router) -> DST=192.168.32.10

How do I configure it so that it logs the conversations correctly?

SRC=192.168.32.10 -> DST=60.242.67.190 SRC=60.242.67.190 > DST=192.168.32.10

Any help appreciated, cheers

© Server Fault or respective owner

Related posts about iptables

Related posts about nat