I've been working my pf.conf rules and adding labels and tags. Perhaps I've been spellbound, but I assumed pflog would contain this information and tcpdump would display it. Here's an old mailing list entry about a label patch for tcpdump.
Is there some magic for viewing at least a label attached to a log entry?
See below for the pf rule, tcpdump options and output. BTW, despite "if_src_gate" being in the label and the log, the log entry was generated from the block rule's position inside an anchor named "if_src_gate". Perhaps, with a liberal use of anchors, having the label in the log is not critical. Still, I'd like to know if it's possible for other debugging purposes.
Thank you.
Is there some magic for viewing at least a label attached to a log entry?
See below for the pf rule, tcpdump options and output. BTW, despite "if_src_gate" being in the label and the log, the log entry was generated from the block rule's position inside an anchor named "if_src_gate". Perhaps, with a liberal use of anchors, having the label in the log is not critical. Still, I'd like to know if it's possible for other debugging purposes.
Thank you.
Code:
# /etc/pf.conf: rule 7.8/0 is
# block quick log tagged NOTAG label "if_src_gate $if"
# tcpdump -n -e -tttt -vvv -r /var/log/pflog
2025-03-04 13:37:52.529874 rule 7.if_src_gate.8/0(match): block in on e0a_dnsj: (tos 0x0, ttl 64, id 36183, offset 0, flags [none], proto UDP (17), length 69)
10.10.5.7.13955 > 1.1.1.1.53: 33438+ [|domain]