2004-11-18 16:37:24

by Jan Engelhardt

[permalink] [raw]
Subject: local packets not in prerouting

Hi,


I have been observing that locally generated packets with a local destination
have they don't pop up in the nat/PREROUTING chain.
Anybody know why this is done? (If not, it's a bug.)


As a side observation, those packets have source ip == destination ip, so if I
telnet to '127.0.0.44', a LOG target says SRC=127.0.0.44 and DST=127.0.0.44.
Should not be SRC always be 127.0.0.1?



Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, http://www.gwdg.de


2004-11-18 18:23:22

by Martin Josefsson

[permalink] [raw]
Subject: Re: local packets not in prerouting

On Thu, 2004-11-18 at 17:37, Jan Engelhardt wrote:
> Hi,

Hi

> I have been observing that locally generated packets with a local destination
> have they don't pop up in the nat/PREROUTING chain.
> Anybody know why this is done? (If not, it's a bug.)

It's not a bug. All locally generated packets go through nat/OUTPUT ,
not nat/PREROUTING.

--
/Martin


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-11-19 02:20:07

by Jan Engelhardt

[permalink] [raw]
Subject: Re: local packets not in prerouting

>> I have been observing that locally generated packets with a local destination
>> have they don't pop up in the nat/PREROUTING chain.
>> Anybody know why this is done? (If not, it's a bug.)
>
>It's not a bug. All locally generated packets go through nat/OUTPUT ,
>not nat/PREROUTING.

Yeah I apparently found that out too now :] (it says "nat", which does not
apply to locals anyway). "mangle" looks like what I need.
Unfortunately, the REDIRECT target is only for nat, oh no :(



Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, http://www.gwdg.de