summaryrefslogtreecommitdiff
path: root/usr.sbin/ipmon/ipmon.8
blob: 5d79bf389e44e29a287eb7f5b98ed525746515ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\"     $OpenBSD: ipmon.8,v 1.9 1999/02/10 22:12:54 deraadt Exp $          
.TH ipmon 8
.SH NAME
ipmon \- monitors /dev/ipl for logged packets
.SH SYNOPSIS
.B ipmon
[
.B \-aDFhnstvxX
] [
.B "\-o [NSI]"
] [
.B "\-O [NSI]"
] [
.B "\-N <device>"
] [
.B "\-S <device>"
] [
.B "\-f <device>"
] [
.B <filename>
]
.SH DESCRIPTION
.LP
\fBipmon\fP opens \fB/dev/ipl\fP for reading and awaits data to be saved from
the packet filter.  The binary data read from the device is reprinted in
human readable for, however, IP#'s are not mapped back to hostnames, nor are
ports mapped back to service names.  The output goes to standard output by
default or a filename, if given on the command line.  Should the \fB\-s\fP
option be used, output is instead sent to \fBsyslogd(8)\fP.  Messages sent
via syslog have the day, month and year removed from the message, but the
time (including microseconds), as recorded in the log, is still included.
.SH OPTIONS
.TP
.B \-a
Open all of the device logfiles for reading log entries from.  All entries
are displayed to the same output 'device' (stderr or syslog).
.TP
.B "\-f <device>"
specify an alternative device/file from which to read the log information
for normal IP Filter log records.
.TP
.B \-D
When set ipmon will fork and become a daemon.
.TP
.B \-F
Flush the current packet log buffer.  The number of bytes flushed is displayed,
even should the result be zero.
.TP
.B "\-N <device>"
Set the logfile to be opened for reading NAT log records from to <device>.
.TP
.B \-n
IP addresses and port numbers will be mapped, where possible, back into
hostnames and service names.
.TP
.B \-o
Specify which log files to actually read data from.  N - NAT logfile,
S - State logfile, I - normal IP Filter logfile.  The \fB-a\fP option is
equivalent to using \fB-o NSI\fP.
.TP
.B \-O
Specify which log files you do not wish to read from.  This is most sensibly
used with the \fB-a\fP.  Letters available as parameters to this are the same
as for \fB-o\fP.
.TP
.B \-s
Packet information read in will be sent through syslogd rather than
saved to a file.  The default facility when compiled and installed is
\fBlocal0\fP.  The following levels are used:
.IP
.B LOG_INFO
\- packets logged using the "log" keyword as the action rather
than pass or block.
.IP
.B LOG_NOTICE
\- packets logged which are also passed
.IP
.B LOG_WARNING
\- packets logged which are also blocked
.IP
.B LOG_ERR
\- packets which have been logged and which can be considered
"short".
.TP
.B \-S
Treat the logfile as being composed of state log records.
.TP
.B "\-S <device>"
Set the logfile to be opened for reading state log records from to <device>.
.IP
.B \-t
read the input file/device in a manner akin to tail(1).
.TP
.B \-v
show tcp window, ack and sequence fields.
.TP
.B \-x
show the packet data in hex.
.TP
.B \-X
show the log header record data in hex.
.SH DIAGNOSTICS
\fBipmon\fP expects data that it reads to be consistent with how it should be
saved and will abort if it fails an assertion which detects an anomaly in the
recorded data.
.SH FILES
/dev/ipl
.br
/dev/ipnat
.br
/dev/ipstate
.SH SEE ALSO
ipf(8), ipftest(1), ipnat(8), ipf(4), ipl(4), ipnat(4), ipf(5), ipnat(5), ipfstat(8)
.br
http://coombs.anu.edu.au/ipfilter/
.SH BUGS