File: dnstop.8

package info (click to toggle)
dnstop 20080321-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 144 kB
  • ctags: 241
  • sloc: ansic: 2,761; makefile: 46
file content (173 lines) | stat: -rw-r--r-- 3,824 bytes parent folder | download
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
.\" $Id: dnstop.8,v 1.20 2008/03/21 21:36:11 wessels Exp $
.\" 
.\" manpage written by jose@monkey.org
.\"
.Dd 21 March, 2008
.Dt DNSTOP 8
.Os
.Sh NAME
.Nm dnstop
.Nd displays various tables of DNS traffic on your network
.Sh SYNOPSIS
.Nm
.Op Fl 46apsQR
.Op Fl b Ar expression
.Op Fl i Ar address
.Op Fl f Ar filter
.Op Fl r Ar interval
.Op Ar device
.Op Ar savefile
.Sh DESCRIPTION
.Nm
is a small tool to listen on
.Ar device
or to parse the file
.Ar savefile
and collect and print statistics on the local network's DNS traffic. You
must have read access to 
.Pa /dev/bpf\&* .
.Sh COMMAND LINE OPTIONS
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 4
count only messages with IPv4 addresses
.It Fl 6
count only messages with IPv6 addresses
.It Fl a
anonymize addresses
.It Fl b Ar expression
BPF filter expression
.br
(default: udp port 53)
.It Fl i Ar address
ignore select addresses
.It Fl p
Do not put the interface into promiscuous mode.
.It Fl r
Redraw interval (seconds).
.It Fl l Ar level
keep counts on names up to
.Pa level
domain name levels.
.Pp
For example, with -l 2 (the default),
.Nm
will keep two tables: one with top-level domain names, and another
with second-level domain names.  Increasing the
.Pa level
provides more details, but also requires more memory and CPU.
.\"
.It Fl f
input filter name
.Pp
The "unknown-tlds" filter 
includes only queries for TLDs that are
bogus.  Useful for identifying hosts/servers
that leak queries for things like "localhost"
or "workgroup."
.Pp
The "A-for-A" filter
includes only A queries for names that are
already IP addresses.  Certain Microsoft
Windows DNS servers have a known bug that
forward these queries.
.Pp
The "rfc1918-ptr" filter
includes only PTR queries for addresses in RFC1918 space.
These should never leak from inside an
organization.
.\"
.It Fl Q
count only DNS query messages
.It Fl R
count only DNS reply messages
.It Ar savefile
a captured network trace in 
.Cm pcap
format
.It Ar device
ethernet device (ie fxp0)
.El
.Sh RUN TIME OPTIONS
.Pp
While running, the following options are available to alter the display:
.Bl -tag -width Ds
.It s
display the source address table
.It d 
display the destination address table
.It t
display the breakdown of query types seen
.It o
display the breakdown of opcodes seen
.It 1
show 1st level query names
.It 2
show 2nd level query names
.It 3
show 3rd level query names
.It 4
show 4th level query names
.It 5
show 5th level query names
.It 6
show 6th level query names
.It 7
show 7th level query names
.It 8
show 8th level query names
.It 9
show 9th level query names
.It !
show sources + 1st level query names
.It @
show sources + 2nd level query names
.It #
show sources + 3rd level query names
.It $
show sources + 4th level query names
.It %
show sources + 5th level query names
.It ^
show sources + 6th level query names
.It &
show sources + 7th level query names
.It *
show sources + 8th level query names
.It (
show sources + 9th level query names
.It ^R
reset the counters
.It ^X
exit the program
.It space
redraw
.It ?
help
.El
.Pp 
.Sh NON-INTERACTIVE MODE
If stdout is not a tty,
.Nm
runs in non-interactive mode.  In this case, you must
supply a savefile for reading, instead of capturing
live packets.  After reading the entire savefile,
.Nm
prints the top 50 entries for each table.
.Sh AUTHORS
.Bl -tag -width xx -compact
.It Pa Duane Wessels (wessels@measurement-factory.com)
.It Pa Mark Foster (mark@foster.cc)
.It Pa Jose Nazario (jose@monkey.org)
.It Pa Sam Norris <@ChangeIP.com>
.It Pa Max Horn <@quendi.de>
.It Pa John Morrissey <jwm@horde.net>
.It Pa Florian Forster <octo@verplant.org>
.It Pa Dave Plonka <plonka@cs.wisc.edu>
.It Pa http://dnstop.measurement-factory.com/
.El
.Sh BUGS
Unless compiled with
.Tn -DUSE_PPP
the program will not correctly decode PPP frames.