Skip to contentSkip to conversation

Re: [Re: Logging packets with original address]

Re: Logging packets with original address prabha 1 participant 1 message Mar 4, 2004

lore
Share & tools
lore

prabha

author
#0 lore raw

Hi
I can have the log in the PREROUTING chain. But, I have to log
ACCEPTed
and DROPped packets in the INPUT / FORWARD chains separately. I use the options in the LOG target to tag the ACCEPTed and DROPped packets.
So, I cannot have them logged in the PREROUTING chain, where we will not know
whether the packet is going to be accepted or dropped.
I have to log the messages in the INPUT or FORWARD chains, but with
the
original addresses.

Regards
Prabha

From [email protected] Wed Mar 3 09:53:24 2004

Quoted 11 lines

From: [email protected] (Antony Stone)
Date: Wed, 3 Mar 2004 09:53:24 +0000
Subject: Logging packets with original address
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

On Wednesday 03 March 2004 9:10 am, prabha wrote:

Hi
I want to log some packets in the INPUT and FORWARD chains, but

with

Quoted 6 lines

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

Quoted 8 lines

pass through PREROUTING.

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

Correct.

I do not want the NATted address to be present in the logs, but the

original

Quoted 7 lines

address as the received interface saw it. Is this possible?

Put the LOG rule in the PREROUTING chain.

Regards,

Antony.