2 .\" To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
4 .\" Portions Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
5 .\" Portions Copyright (c) 2013, Joyent, Inc. All Rights Reserved.
6 .TH IPMON 1M "Oct 30, 2013"
8 ipmon \- monitors /dev/ipl for logged packets
12 \fBipmon\fR [\fB-abDFhnpstvxX\fR] [\fB-N\fR \fIdevice\fR] [ [o] [NSI]] [\fB-O\fR [NSI]]
13 [\fB-P\fR \fIpidfile\fR] [\fB-S\fR \fIdevice\fR] [\fB-f\fR \fIdevice\fR] [\fB-G\fR | \fB-z\fR \fIzonename\fR] [\fIfilename\fR]
18 The \fBipmon\fR command is part of a suite of commands associated with the
19 Solaris IP Filter feature. See \fBipfilter\fR(5).
22 The \fBipmon\fR command opens \fB/dev/ipl\fR for reading and awaits data to be
23 saved from the packet filter. The binary data read from the device is reprinted
24 in human readable form. However, IP addresses are not mapped back to hostnames,
25 nor are ports mapped back to service names. The output goes to standard output,
26 by default, or a filename, if specified on the command line. Should the
27 \fB-s\fR option be used, output is sent instead to \fBsyslogd\fR(1M). Messages
28 sent by means of \fBsyslog\fR have the day, month, and year removed from the
29 message, but the time (including microseconds), as recorded in the log, is
33 Messages generated by \fBipmon\fR consist of whitespace-separated fields.
34 Fields common to all messages are:
39 The date of packet receipt. This is suppressed when the message is sent to
46 The time of packet receipt. This is in the form
47 \fIHH\fR:\fIMM\fR:\fISS\fR.\fIF\fR, for hours, minutes, seconds, and fractions
48 of a second (which can be several digits long).
54 The name of the interface on which the packet was processed, for example,
61 The group and rule number of the rule, for example, \fB@0:17\fR. These can be
62 viewed with \fBipfstat\fR \fB-in\fR for input rules or \fBipfstat\fR \fB-in\fR
63 for output rules. See \fBipfstat\fR(1M).
69 The action: \fBp\fR for passed, \fBb\fR for blocked, \fBs\fR for a short
70 packet, \fBn\fR did not match any rules, or \fBL\fR for a log rule.
76 The addresses. This is actually three fields: the source address and port
77 (separated by a comma), the symbol \(->, and the destination address and port.
78 For example: \fB209.53.17.22,80 \(-> 198.73.220.17,1722\fR.
84 \fBPR\fR followed by the protocol name or number, for example, \fBPR tcp\fR.
90 \fBlen\fR followed by the header length and total length of the packet, for
91 example, \fBlen 20 40\fR.
95 If the packet is a TCP packet, there will be an additional field starting with
96 a hyphen followed by letters corresponding to any flags that were set. See
97 \fBipf.conf\fR(4) for a list of letters and their flags.
100 If the packet is an ICMP packet, there will be two fields at the end, the first
101 always being \fBicmp\fR, the next being the ICMP message and submessage type,
102 separated by a slash. For example, \fBicmp 3/3\fR for a port unreachable
106 The following options are supported:
114 Open all of the device logfiles for reading log entries. All entries are
115 displayed to the same output device (stderr or syslog).
125 For rules which log the body of a packet, generate hex output representing the
126 packet contents after the headers.
136 Cause \fBipmon\fR to turn itself into a daemon. Using subshells or
137 backgrounding of \fBipmon\fR is not required to turn it into an orphan so it
138 can run indefinitely.
144 \fB\fB-f\fR \fIdevice\fR\fR
148 Specify an alternative device/file from which to read the log information for
149 normal IP Filter log records.
159 Flush the current packet log buffer. The number of bytes flushed is displayed,
160 even if the result is zero.
170 Displays usage information.
180 IP addresses and port numbers will be mapped, where possible, back into
181 hostnames and service names.
187 \fB\fB-N\fR \fIdevice\fR\fR
191 Set the logfile to be opened for reading NAT log records from or to
198 \fB\fB-o\fR \fIletter\fR\fR
202 Specify which log files from which to actually read data. \fBN\fR, NAT logfile;
203 \fBS\fR, state logfile; \fBI\fR, normal IP Filter logfile. The \fB-a\fR option
204 is equivalent to using \fB-o\fR \fBNSI\fR.
210 \fB\fB-O\fR \fIletter\fR\fR
214 Specify which log files you do not wish to read from. This is most commonly
215 used in conjunction with the \fB-a\fR. Letters available as parameters are the
216 same as for \fB-o\fR.
226 Cause the port number in log messages always to be printed as a number and
227 never attempt to look it up.
233 \fB\fB-P\fR \fIpidfile\fR\fR
237 Write the PD of the \fBipmon\fR process to a file. By default this is
238 \fB/var/run/ipmon.pid\fR.
248 Packet information read in will be sent through \fBsyslogd\fR rather than saved
249 to a file. The default facility when compiled and installed is \fBlocal0\fR.
250 The following levels are used:
258 Packets logged using the \fBlog\fR keyword as the action rather than \fBpass\fR
265 \fB\fBLOG_NOTICE\fR\fR
269 Packets logged that are also passed.
275 \fB\fBLOG_WARNING\fR\fR
279 Packets logged that are also blocked.
289 Packets that have been logged and that can be considered "short".
297 \fB\fB-S\fR \fIdevice\fR\fR
301 Set the logfile to be opened for reading state log records from or to
312 Read the input file/device in the way performed by \fBtail\fR(1).
322 Show TCP \fBwindow\fR, \fBack\fR, and \fBsequence\fR fields
332 Show the packet data in hex.
342 Show the log header record data in hex.
348 \fB\fB-z\fR \fIzonename\fR\fR
352 Monitor packets the specified zone's in-zone filter. If neither this option
353 nor \fB-G\fR is specified, the current zone is used. This command is only
354 available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m) for more
361 \fB\fB-G\fR \fIzonename\fR\fR
365 Monitor packets for the specified zone's global zone controlled filter. If
366 neither this option nor \fB-z\fR is specified, the current zone is used. This
367 command is only available in the Global Zone. See \fBZONES\fR in \fBipf\fR(1m)
368 for more information.
392 See \fBattributes\fR(5) for descriptions of the following attributes:
400 ATTRIBUTE TYPE ATTRIBUTE VALUE
402 Interface Stability Committed
407 \fBipf\fR(1M), \fBipfstat\fR(1M), \fBipnat\fR(1M), \fBattributes\fR(5),
408 \fBipfilter\fR(5), \fBzones(5)\fR
414 \fBipmon\fR expects data that it reads to be consistent with how it should be
415 saved and aborts if it fails an assertion which detects an anomaly in the