1ipmon(1M)               System Administration Commands               ipmon(1M)
2
3
4

NAME

6       ipmon - monitors /dev/ipl for logged packets
7

SYNOPSIS

9       ipmon [-abDFhnpstvxX] [-N device] [ [o] [NSI]] [-O [NSI]]
10            [-P pidfile] [-S device] [-f device] [filename]
11
12

DESCRIPTION

14       The  ipmon  command  is part of a suite of commands associated with the
15       Solaris IP Filter feature. See ipfilter(5).
16
17
18       The ipmon command opens /dev/ipl for reading  and  awaits  data  to  be
19       saved  from  the packet filter. The binary data read from the device is
20       reprinted in human readable form. However, IP addresses are not  mapped
21       back to hostnames, nor are ports mapped back to service names. The out‐
22       put goes to standard output, by default, or a filename, if specified on
23       the  command line. Should the -s option be used, output is sent instead
24       to syslogd(1M). Messages sent by means of syslog have the  day,  month,
25       and  year  removed  from the message, but the time (including microsec‐
26       onds), as recorded in the log, is still included.
27
28
29       Messages generated by ipmon  consist  of  whitespace-separated  fields.
30       Fields common to all messages are:
31
32           o      The date of packet receipt. This is suppressed when the mes‐
33                  sage is sent to syslog.
34
35           o      The time of packet receipt. This is in the form  HH:MM:SS.F,
36                  for  hours,  minutes,  seconds,  and  fractions  of a second
37                  (which can be several digits long).
38
39           o      The name of the interface on which the packet was processed,
40                  for example, ib1.
41
42           o      The  group  and rule number of the rule, for example, @0:17.
43                  These can be viewed with ipfstat -in for input rules or ipf‐
44                  stat -in for output rules. See ipfstat(1M).
45
46           o      The  action:  p  for  passed,  b  for blocked, s for a short
47                  packet, n did not match any rules, or L for a log rule.
48
49           o      The addresses. This is actually  three  fields:  the  source
50                  address  and  port (separated by a comma), the symbol →, and
51                  the   destination   address   and   port.    For    example:
52                  209.53.17.22,80 → 198.73.220.17,1722.
53
54           o      PR  followed by the protocol name or number, for example, PR
55                  tcp.
56
57           o      len followed by the header length and total  length  of  the
58                  packet, for example, len 20 40.
59
60
61       If the packet is a TCP packet, there will be an additional field start‐
62       ing with a hyphen followed by letters corresponding to any  flags  that
63       were set. See ipf.conf(4) for a list of letters and their flags.
64
65
66       If  the  packet is an ICMP packet, there will be two fields at the end,
67       the first always being icmp, the next being the ICMP message  and  sub‐
68       message  type,  separated  by a slash. For example, icmp 3/3 for a port
69       unreachable message.
70

OPTIONS

72       The following options are supported:
73
74       -a
75
76           Open all of the  device  logfiles  for  reading  log  entries.  All
77           entries are displayed to the same output device (stderr or syslog).
78
79
80       -b
81
82           For  rules which log the body of a packet, generate hex output rep‐
83           resenting the packet contents after the headers.
84
85
86       -D
87
88           Cause ipmon to turn itself into a daemon. Using subshells or  back‐
89           grounding  of ipmon is not required to turn it into an orphan so it
90           can run indefinitely.
91
92
93       -f device
94
95           Specify an alternative device/file  from  which  to  read  the  log
96           information for normal IP Filter log records.
97
98
99       -F
100
101           Flush the current packet log buffer. The number of bytes flushed is
102           displayed, even if the result is zero.
103
104
105       -h
106
107           Displays usage information.
108
109
110       -n
111
112           IP addresses and port numbers will be mapped, where possible,  back
113           into hostnames and service names.
114
115
116       -N device
117
118           Set the logfile to be opened for reading NAT log records from or to
119           device.
120
121
122       -o letter
123
124           Specify which log files from which to actually read  data.  N,  NAT
125           logfile;  S,  state  logfile;  I,  normal IP Filter logfile. The -a
126           option is equivalent to using -o NSI.
127
128
129       -O letter
130
131           Specify which log files you do not wish to read from. This is  most
132           commonly  used  in  conjunction  with  the -a. Letters available as
133           parameters are the same as for -o.
134
135
136       -p
137
138           Cause the port number in log messages always to  be  printed  as  a
139           number and never attempt to look it up.
140
141
142       -P pidfile
143
144           Write  the  PD  of  the ipmon process to a file. By default this is
145           /var/run/ipmon.pid.
146
147
148       -s
149
150           Packet information read in will be sent through syslogd rather than
151           saved  to  a file. The default facility when compiled and installed
152           is local0. The following levels are used:
153
154           LOG_INFO
155
156               Packets logged using the log keyword as the action rather  than
157               pass or block.
158
159
160           LOG_NOTICE
161
162               Packets logged that are also passed.
163
164
165           LOG_WARNING
166
167               Packets logged that are also blocked.
168
169
170           LOG_ERR
171
172               Packets  that  have  been  logged  and  that  can be considered
173               "short".
174
175
176
177       -S device
178
179           Set the logfile to be opened for reading state log records from  or
180           to device.
181
182
183       -t
184
185           Read the input file/device in the way performed by tail(1).
186
187
188       -v
189
190           Show TCP window, ack, and sequence fields
191
192
193       -x
194
195           Show the packet data in hex.
196
197
198       -X
199
200           Show the log header record data in hex.
201
202

FILES

204           o      /dev/ipl
205
206           o      /dev/ipnat
207
208           o      /dev/ipstate
209

ATTRIBUTES

211       See attributes(5) for descriptions of the following attributes:
212
213
214
215
216       ┌─────────────────────────────┬─────────────────────────────┐
217       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
218       ├─────────────────────────────┼─────────────────────────────┤
219       │Availability                 │SUNWipfu                     │
220       ├─────────────────────────────┼─────────────────────────────┤
221       │Interface Stability          │Committed                    │
222       └─────────────────────────────┴─────────────────────────────┘
223

SEE ALSO

225       ipf(1M), ipfstat(1M), ipnat(1M), attributes(5), ipfilter(5)
226
227
228
229

DIAGNOSTICS

231       ipmon expects data that it reads to be consistent with how it should be
232       saved and aborts if it fails an assertion which detects an  anomaly  in
233       the recorded data.
234
235
236
237SunOS 5.11                        3 Apr 2008                         ipmon(1M)
Impressum