DNSTOP(8)
๐ธ DNSTOP(8) โ System Manager's Manual ๐ธ
okay so bestie, welcome to the dnstop(8) page: itโs giving โsmall tool, big DNS energy,โ and weโre about to get into every single detail. ๐
โจ NAME โจ
dnstop โ displays various tables of DNS traffic on your network
๐ฆ SYNOPSIS ๐ฆ
dnstop [-46apsQR] [-b expression] [-i address] [-f filter] [-r interval]
[device] [savefile]
๐ DESCRIPTION ๐
okay so dnstop is a small tool that listens on device or parses the file savefile, then collects and prints statistics on the local networkโs DNS traffic. Itโs literally that girl. โจ
๐ heads up, bestie: you must have read access to /dev/bpf*.
๐ ๏ธ COMMAND LINE OPTIONS ๐ ๏ธ
the options are as follows โ no skips, no cap:
-4โ count only messages with IPv4 addresses-6โ count only messages with IPv6 addresses-Qโ count only DNS query messages-Rโ count only DNS reply messages-aโ anonymize addresses-b expressionโ BPF filter expression; default isudp port 53-i addressโ ignore select addresses-pโ do not put the interface into promiscuous mode-rโ redraw interval (seconds); the synopsis spells it as-r interval-l levelโ keep counts on names up to level domain name levels- for example, with
-l 2(the default),dnstopwill keep two tables: one with top-level domain names, and another with second-level domain names. Increasing the level provides more details, but also requires more memory and CPU. ๐
- for example, with
-f filterโ input filter name; hereโs the filter menu, iykyk:unknown-tldsโ includes only queries for TLDs that are bogus. Useful for identifying hosts/servers that leak queries for things like"localhost"or"workgroup."new-gtldsโ includes only queries for the new gTLD program of 2013/2014. Useful for identifying hosts/servers that use names which may result in future collisions and problems when new gTLDs become active.A-for-Aโ includes only A queries for names that are already IP addresses. Certain Microsoft Windows DNS servers have a known bug that forward these queries.rfc1918-ptrโ includes only PTR queries for addresses in RFC1918 space. These should never leak from inside an organization.refusedโ when used with the-Roption, tellsdnstopto count only replies with rcodeREFUSED.qtype-anyโ tellsdnstopto count only message of typeANY.
-n nameโ only count messages within the domain name-Pโ print"progress"messages onstderrwhen in non-interactive mode-B bucketsโ use buckets hash table buckets-Xโ do not tabulate the sources + query name counters. This can significantly reduce memory usage on busy servers and large savefiles.savefileโ a captured network trace in pcap formatdeviceโ ethernet device (iefxp0)
๐ฎ RUN TIME OPTIONS ๐ฎ
while itโs running, these keys are your remote control, bestie:
sโ display the source address tabledโ display the destination address tabletโ display the breakdown of query types seenrโ display the breakdown of response codes seenoโ display the breakdown of opcodes seen1โ show 1st level query names2โ show 2nd level query names3โ show 3rd level query names4โ show 4th level query names5โ show 5th level query names6โ show 6th level query names7โ show 7th level query names8โ show 8th level query names9โ show 9th level query names!โ show sources + 1st level query names@โ show sources + 2nd level query names#โ show sources + 3rd level query names$โ show sources + 4th level query names%โ show sources + 5th level query names^โ show sources + 6th level query names&โ show sources + 7th level query names*โ show sources + 8th level query names(โ show sources + 9th level query names^Rโ reset the counters^Xโ exit the programspaceโ redraw?โ help
๐ NON-INTERACTIVE MODE ๐
if stdout is not a tty, dnstop 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, dnstop prints the top 50 entries for each table. periodt. ๐
๐ HOW MESSAGES ARE COUNTED ๐
by default, dnstop examines only query messages and ignores replies. In this case the response code table is meaningless and will likely show 100% "Noerror." ๐ญ
if you supply (only) the -R command line option, dnstop examines replies and ignores queries. This allows you to see meaningful response code values, as well as all the other tables. In this case all the query attributes (such as type and name) are taken from the Question section of the reply. slay. โจ
note, however, that it is common for a stream of DNS messages to contain more queries than replies. This could happen, for example, if the server is too busy to respond to every single query, or if the server is designed to ignore malformed query messages. Therefore, you might want to examine both queries and replies by giving both -R and -Q command line options. In this case, only the response code counts are taken from the replies and all other attributes are taken from the queries. fr fr. ๐ซถ
๐ AUTHORS ๐
shoutout to the icons who made this happen:
- Duane Wessels (
wessels@measurement-factory.com) - Mark Foster (
mark@foster.cc) - Jose Nazario (
jose@monkey.org) - Sam Norris (
<@ChangeIP.com>) - Max Horn (
<@quendi.de>) - John Morrissey (
jwm@horde.net) - Florian Forster (
octo@verplant.org) - Dave Plonka (
plonka@cs.wisc.edu) http://dnstop.measurement-factory.com/
๐ BUGS ๐
๐จ BUGS vibe check: does not support TCP at this time. thatโs the tea. ๐
๐ cute sign-off: Debian, 21 March, 2008 โ source/version and date, periodt. ๐ซถ
๐ฆ where this page comes from
- alpine 3.22: dnstop-doc 20140915-r7 ยท BSD-3-Clause
- alpine 3.23: dnstop-doc 20140915-r7 ยท BSD-3-Clause
- alpine 3.24: dnstop-doc 20140915-r8 ยท BSD-3-Clause
- nixos 26.05: dnstop 2014-09-15
- nixpkgs unstable: dnstop 2014-09-15
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms