|-D||Debugging mode. pflogd does not disassociate from the controlling terminal.|
|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.|
|Log output filename. Default is /var/log/pflog.|
|Specifies the pflog(4) interface to use. By default, pflogd will use pflog0.|
|Writes a file containing the process ID of the program to /var/run. The file name has the form <pidfile.pid>. The default is pflogd.|
|Analyze at most the first snaplen bytes of data from each packet rather than the default of 116. The default of 116 is adequate for IP, ICMP, TCP, and UDP headers but may truncate protocol information for other protocols. Other file parsers may desire a higher snaplen.|
|-x||Check the integrity of an existing log file, and return.|
|Selects which packets will be dumped, using the regular language of tcpdump(1).|
/var/run/pflogd.pid Process ID of the currently running pflogd. /var/log/pflog Default log file.
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
Log from another pflog(4) interface, excluding specific packets:# pflogd -i pflog3 -f network3.log "not (tcp and port 23)"
Display binary logs:# tcpdump -n -e -ttt -r /var/log/pflog
Display the logs in real time (this does not interfere with the operation of pflogd):# tcpdump -n -e -ttt -i pflog0
Tcpdump has been extended to be able to filter on the pfloghdr structure defined in <net/if_pflog.h>. Tcpdump can restrict the output to packets logged on a specified interface, a rule number, a reason, a direction, an IP family or an action.
ip Address family equals IPv4. ip6 Address family equals IPv6. ifname kue0 Interface name equals "kue0". on kue0 Interface name equals "kue0". ruleset authpf Ruleset name equals "authpf". rulenum 10 Rule number equals 10. reason match Reason equals match. Also accepts "bad-offset", "fragment", "bad-timestamp", "short", "normalize", "memory", "congestion", "ip-option", "proto-cksum", "state-mismatch", "state-insert", "state-limit", "src-limit", and "synproxy". action pass Action equals pass. Also accepts "block". inbound The direction was inbound. outbound The direction was outbound.
Display the logs in real time of inbound packets that were blocked on the wi0 interface:# tcpdump -n -e -ttt -i pflog0 inbound and action block and on wi0
The pflogd command appeared in
.Ox 3.0 .
pflogd was written by
.An Can Erkin Acar Aq firstname.lastname@example.org .