Logging all packets in firewalld

firewalldlogging

We're trying to configure firewalld to log all incoming packets. So far I've only managed to log only rejected packets with LogDenied=off that shows:

 FINAL_REJECT: IN=eth0 OUT= MAC=00:dd:3a:26:18:2d:dd:34:5f:78:9a:bc:ff:00 SRC=65.13.35.231 DST=10.0.1.5 LEN=48 TOS=0x00 PREC=0x00 TTL=102 ID=31984 DF PROTO=TCP SPT=49886 DPT=3385 WINDOW=8192 RES=0x00 SYN URGP=0

But I need to log accepted packets as well. Is there any option to do that?

Best Answer

You can tag any rule with a prefix to identify accepted rules:

firewall-cmd --add-rich-rule='rule family=ipv4 source address=10.20.0.0/16 port port=1234 protocol=tcp log prefix="MyTagHere " level=info accept'