Skip to contentSkip to conversation

Logging packets with original address

DISCUSSION prabha 2 participants 2 messages Mar 3, 2004

lore
Share & tools
lore

prabha

author
#0 lore raw

Hi
I want to log some packets in the INPUT and FORWARD chains, but with
the
original address of the packets. (ie) with the destination address before any DNAT
rule has been applied on the packet in the PREROUTING chain.
When the packet comes to the INPUT / FORWARD chains, it will be
after any
DNAT has been applied. I do not want the NATted address to be present in

the logs, but the original address as the received interface saw it. Is this possible?

Regards
Prabha

#1 lore raw
Quoted 4 lines · prabha

Hi
I want to log some packets in the INPUT and FORWARD chains, but with
the original address of the packets. (ie) with the destination address before any DNAT rule has been applied on the packet in the PREROUTING chain.

You cannot do this because packets pass through the INPUT chain after they pass through PREROUTING.

Quoted 2 lines

When the packet comes to the INPUT / FORWARD chains, it will be
after any DNAT has been applied.

Correct.

Quoted 2 lines

I do not want the NATted address to be present in the logs, but the original address as the received interface saw it. Is this possible?

Put the LOG rule in the PREROUTING chain.

Regards,

Antony.

Signature · 6 lines
What is this talk of "software release"?
Our software evolves and matures until it is capable of escape, leaving a 
bloody trail of designers and quality assurance people in its wake.

                                                     Please reply to the list;
                                                           please don't CC me.