AZiT

Logging pipeline is highlighted; its page is below.

Logging pipeline

pf writes each logged packet to a virtual interface. A small helper turns those packets into syslog lines carrying the rule's name, and syslogd sends them over TLS to the SIEM in the cluster.

The path#

Firewall pflogs a packet pflog0virtual interface pflog2syslogadds the rule name syslogdTLS, ISO timestamps syslog over TLS, port 6514, certificate verified Cluster Vectorparses, enriches OpenSearchdaily indices Dashboardssearch, maps Alertingtwo monitors
Every logged decision takes this path, and reaches OpenSearch within seconds.
  • pflog0. Every logged block, and every logged new connection, appears here as a packet.
  • pflog2syslog. An rc service reads pflog0 with tcpdump and appends label=<rule name> from a map it rebuilds at every start.
  • syslogd. Forwards over TLS, includes its hostname and writes ISO timestamps in UTC. It verifies the receiver against the home CA, and proves itself with a client certificate of its own: Vector accepts no connection without one.
  • Vector, in the cluster. Parses each line into structured fields and writes it to OpenSearch.

Configuration#

/etc/syslog.conf (forwarding line)
*.notice;local0.info;auth.info;authpriv.info	@tls://siem.internal:6514
  • Selector order matters: *.notice comes first, or it overrides the more specific entries after it.
/etc/rc.conf.local
syslogd_flags=-h -Z -C /etc/ssl/homelab-ca.crt
pkg_scripts=pflog2syslog
  • -h adds the hostname, -Z switches to ISO timestamps in UTC, -C names the CA that the receiver's certificate must chain to.