summaryrefslogtreecommitdiff
path: root/share/man/man4
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-09-09 13:56:40 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-09-09 13:56:40 +0000
commiteafa0437596580a038262a0363fdd2115f6f1726 (patch)
tree508e9ede5b29e41966fa0aa869df62cbd54600a3 /share/man/man4
parent456e9ebf40a66cc20f4da77dbd097479607938d9 (diff)
welcome pflow(4), a netflow v5 compatible flow export interface.
flows export data gathered from pf states. initial implementation by Joerg Goltermann <jg@osn.de>, guidance and many changes by me. 'put it in' theo
Diffstat (limited to 'share/man/man4')
-rw-r--r--share/man/man4/pflow.487
1 files changed, 87 insertions, 0 deletions
diff --git a/share/man/man4/pflow.4 b/share/man/man4/pflow.4
new file mode 100644
index 00000000000..46e9666fcca
--- /dev/null
+++ b/share/man/man4/pflow.4
@@ -0,0 +1,87 @@
+.\" $OpenBSD: pflow.4,v 1.1 2008/09/09 13:56:38 henning Exp $
+.\"
+.\" Copyright (c) 2008 Henning Brauer <henning@openbsd.org>
+.\" Copyright (c) 2008 Joerg Goltermann <jg@osn.de>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALLWARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BELIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISINGOUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: September 9 2008 $
+.Dt PFLOW 4
+.Os
+.Sh NAME
+.Nm pflow
+.Nd kernel interface for pflow data export
+.Sh SYNOPSIS
+.Cd "pseudo-device pflow"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a pseudo-device which exports pflow
+accounting data from the kernel using
+.Xr udp 4
+packets.
+pflow is compatible with netflow v5.
+The data is extracted from the
+.Xr pf 4
+state table.
+.Pp
+Only states created by a rule marked with the
+.Ar pflow
+keyword are exported by the
+.Nm
+interface.
+.Pp
+The
+.Nm
+interface will attempt to export multiple pflow records in one
+UDP packet, but will not hold a record for longer than 30 seconds.
+The maximum number of flows is controlled by the
+.Ar mtu
+parameter of ifconfig
+(see the
+.Xr ifconfig 8
+.Cm mtu
+parameter).
+.Pp
+Each packet seen on this interface has one header and a variable number of
+flows.
+The header indicates the version of the protocol, number of
+flows in the packet, a unique sequence number, system time, and an engine
+ID and type.
+Header and flow structs are defined in
+.Aq Pa net/if_pflow.h .
+.Pp
+The pflow source and destination addresses are controlled by
+.Xr ifconfig 8 .
+flowsrc is the sender IP address of the UDP packet which can be used
+to identify the source of the data on the pflow collector.
+flowdst defines the collector IP address and the port.
+The flowdst IP address and port must be defined to enable the export of flows.
+.Pp
+For example, the following command sets 10.0.0.1 as the source
+and 10.0.0.2:1234 as destination:
+.Bd -literal -offset indent
+# ifconfig pflow0 flowsrc 10.0.0.1 flowdst 10.0.0.2:1234
+.Ed
+.Sh SEE ALSO
+.Xr netintro 4 ,
+.Xr pf 4 ,
+.Xr udp 4 ,
+.Xr pf.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr tcpdump 8
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Ox 4.5 .