Logging NAT translations and correlating nat & rule logs

From: Özkan KIRIK <ozkan.kirik_at_gmail.com>
Date: Sun, 28 Nov 2021 19:06:21 UTC
Hi,

I'm trying to log NAT, BINAT, RDR translations. But the "nat log on
...." statement only logs the packets after translation is done. So
the information before translation is lost.
Is there a way to log the translation details ?

The other question: how can I correlate nat logs and rule logs for the
same packet?
Especially, when the pf configured as if-bound, 4 different log could
be generated for the same packet:
1st - Nat log on receive interface (in)
2nd - Rule log on receive interface (in)
3rd - Nat log on transmit interface (out)
4th - Rule log on transmit interface (out)

I'm looking for a common key for joining these 4 logs.

Thank you,
Have a nice day