PFLOGD(8)               OpenBSD System Manager's Manual              PFLOGD(8)

NAME
     pflogd - packet filter logging daemon

SYNOPSIS
     pflogd [-D] [-d delay] [-f filename] [-s snaplen] [expression]

DESCRIPTION
     pflogd is a background daemon which reads packets logged by pf(4) to the
     packet logging interface pflog0 and writes the packets to a logfile (nor-
     mally /var/log/pflog) in tcpdump(8) binary format.  These logs can be re-
     viewed later using the -r option of tcpdump(8), hopefully offline in case
     there are bugs in the packet parsing code of tcpdump(8).

     pflogd closes and then re-opens the log file when it receives SIGHUP,
     permitting newsyslog(8) to rotate logfiles automatically.  SIGALRM causes
     pflogd to flush the current logfile buffers to the disk, thus making the
     most recent logs available.  The buffers are also flushed every delay
     seconds.

     If the log file contains data after a restart or a SIGHUP, new logs are
     appended to the existing file.  If the existing log file was created with
     a different snaplen, pflogd temporarily uses the old snaplen to keep the
     log file consistent.

     The options are as follows:

     -d delay
             Time in seconds to delay between automatic flushes of the file.
             This may be specified with a value between 5 and 3600 seconds.
             If not specified, the default is 60 seconds.

     -D      Debugging mode.  pflogd does not disassociate from the control-
             ling terminal.

     -f filename
             Log output filename. Default is /var/log/pflog.

     -s snaplen
             Analyze at most the first snaplen bytes of data from each packet
             rather than the default of 96.  The default of 96 is adequate for
             IP, ICMP, TCP, and UDP headers but may truncate protocol informa-
             tion for other protocols.  Other file parsers may desire a higher
             snaplen.

     expression
             selects which packets will be dumped, using the regular language
             of tcpdump(8).

EXAMPLES
     Log specific tcp packets to a different log file with a large snaplen
     (useful with a log-all rule to dump complete sessions)

           pflogd -s 1600 -f suspicious.log port 80 and host evilhost

     Display binary logs:

           tcpdump -n -e -ttt -r /var/log/pflog

FILES
     /var/run/pflogd.pid  process ID of current
     /var/log/pflog       Default log file

SEE ALSO
     pcap(3), pf(4), pf.conf(5), tcpdump(8), newsyslog(8)

AUTHORS
     Can Erkin Acar

HISTORY
     The pflogd command appeared in OpenBSD 3.0.

OpenBSD 3.0                      July 9, 2001                                2
