*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> pflogd (8)              



NAME    [Toc]    [Back]

     pflogd - packet filter logging daemon

SYNOPSIS    [Toc]    [Back]

     pflogd  [-Dx]  [-d  delay]  [-f   filename]   [-s   snaplen]

DESCRIPTION    [Toc]    [Back]

     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 (normally
  /var/log/pflog)  in  tcpdump(8) binary format.  These
logs can be reviewed
 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

     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.

     pflogd tries to preserve  the  integrity  of  the  log  file
against I/O errors.
   Furthermore,  integrity  of  an existing log file is
verified before
     appending.  If there is an invalid log file or an I/O error,
logging is
     suspended until a SIGHUP or a SIGALRM is received.

     The options are as follows:

     -D       Debugging  mode.  pflogd does not disassociate from
the controlling

     -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.

     -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 information
  for  other  protocols.  Other file parsers may
desire a higher

     -x      Check the integrity of an existing log file, and return.

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

FILES    [Toc]    [Back]

     /var/run/pflogd.pid  Process ID  of  the  currently  running
     /var/log/pflog       Default log file.

EXAMPLES    [Toc]    [Back]

     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

     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".
     rulenum 10     Rule number equals 10.
     reason  match   Reason equals match.  Also accepts "bad-offset", "fragment",
 "short", "normalize" and "memory".
     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

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     The pflogd command appeared in OpenBSD 3.0.

AUTHORS    [Toc]    [Back]

     Can Erkin Acar

OpenBSD      3.6                           July      9,      2001
[ Back ]
 Similar pages
Name OS Title
pflog OpenBSD packet filter logging interface
pfsync OpenBSD packet filter state table logging interface
ipfstat FreeBSD reports on packet filter statistics and filter list
pf OpenBSD packet filter
bpf OpenBSD Berkeley Packet Filter
iptables Linux IP packet filter administration
pfil_hook_get FreeBSD packet filter interface
bpf FreeBSD Berkeley Packet Filter
pfil_remove_hook FreeBSD packet filter interface
pfil_add_hook FreeBSD packet filter interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service