Logging connections on NAT

Hello,

I would like to log the IP source:port → target IP:port and datetime when i do a MASQUERADE on an outgoing port and outgoing connection.
I would like if it is possible to log this and if i can log this outside mikrotik, like to syslog or something.

I would log this information to store for about 5 years.

In a scenario where i share the public ip address behind a NAT with many others, i would like to be able to identify the user when i am asked to identify who accessed a specific website at this time with this source port and target port. Like mentioned above.

It is for IPv4 on TCP protocol.

Anyone please?

Im not sure what conection you want to log but here is example …
I will show you how I loging incoming nated conections to my server on port 443 to file …
First set logging

/system logging action
add disk-file-count=20 disk-file-name=file-nat-in-web443 disk-l
    1000 disk-stop-on-full=no name=fileNatInWeb443 target=disk
/system logging
add action=fileNatInWeb443 disabled=no prefix=file-nat-in-web443
    firewall

Then set firewall nat

/ip firewall nat
add action=log chain=dstnat comment="server web - 443 log" disabled=no \
    dst-port=443 in-interface=wan1 log-prefix=file-nat-in-web443 protocol=tcp \
    to-addresses=192.168.11.8 to-ports=443
add action=dst-nat chain=dstnat comment="server web - 443" disabled=no \
    dst-port=443 in-interface=wan1 protocol=tcp to-addresses=192.168.11.8 \
    to-ports=443

In this way I have log file where I see all incoming details to my server …
This is x86 latest ROS.
Hope that this help you!