overhear

The manual page

overhear(1)

NAME

overhear - passively listen to a LAN and report who is there

SYNOPSIS

overhear [-i iface | -r file] [-j | -t | -v] [-H] [-p] [-Z user] [--proto name[,name...]] [--dhcp-server IP[@VLAN]] [--router MAC|IPV6[@VLAN]] [--max-memory size] [filter ...]

overhear -D

DESCRIPTION

overhear listens to the traffic that every device on a local network sends to everybody (broadcasts and multicasts, ARP, DHCP, IPv6 neighbour discovery, mDNS, LLMNR, NetBIOS name service, SSDP, LLDP, CDP and spanning tree), decodes it, and tells you which devices are there, what they call themselves, and whether anything looks wrong: a second DHCP server, a router advertisement from a machine that should not send one, two devices claiming one address, name-poisoning tools.

It is passive. It never transmits a packet, never answers a query, and never looks up a name or fetches a URL itself. It can therefore be left on a mirror port or a tap of a network you do not control.

Output goes to standard output as one line per packet (the default), a multi-line block per packet (-v), one JSON object per line (-j), or a full-screen device list (-t). Notes for a human (the packet total, errors) go to standard error.

The capture is opened first, and then privileges are dropped (see "PRIVILEGES"). Every byte that arrives is treated as hostile: text that came off the wire is escaped before it is printed, so a device cannot send terminal control sequences to you.

Only Ethernet is decoded, with up to four 802.1Q or 802.1ad (QinQ) VLAN tags; a frame with more is shown as malformed (too many VLAN tags). Other link types are refused.

OPTIONS

-i iface

Capture from this interface. Without -i and -r, the system's default capture device is used. -i and -r cannot be combined.

-r file

Read packets from a pcap or pcapng file instead of capturing. -r - reads the capture from standard input. Times are then shown with the date.

A read from standard input cannot be interrupted. On a pipe that has gone quiet, Ctrl-C ends the run only when more data or the end of the input arrives; press Ctrl-C a second time to stop at once. In the full-screen view (-t -r -), q likewise takes effect only when more data or the end of the input arrives.

-j

One JSON object per line; see "JSON OUTPUT". Cannot be combined with -t or -v.

-t

The full-screen view: a table of devices and a list of warnings. See "KEYS". Cannot be combined with -j, -v or -H.

-v

Verbose: a multi-line block with every decoded field for each packet. Cannot be combined with -j or -t.

-H

Add a hex dump of every frame to the line and verbose output, or a frame_hex field to every packet object in JSON. Cannot be combined with -t.

-p

Do not put the interface in promiscuous mode. You will then see only traffic addressed to this machine, plus broadcasts and multicasts.

-Z user

When started as root, switch to this user once the capture is open (default: nobody). Ignored, with a note, when not started as root. See "PRIVILEGES".

--proto name[,name...]

Capture only these protocols. Names are separated by commas and may be written in any case; the option may be given several times, and a protocol named twice counts once. Each name adds an expression to the capture filter:

name    also          capture filter expression
arp                   arp
dhcp                  udp port 67 or udp port 68
nd      ndp, ipv6-nd  icmp6 and ip6[40] >= 133
                        and ip6[40] <= 137
mdns                  udp port 5353
llmnr                 udp port 5355
nbns    netbios       udp port 137
ssdp                  udp port 1900
lldp                  ether proto 0x88cc
cdp                   ether dst 01:00:0c:cc:cc:cc
stp                   ether dst 01:80:c2:00:00:00

The expressions of the protocols named are joined with or and narrow the built-in filter, so the kernel passes only those frames. This works with every output (lines, -v, -j and -t), live and with -r, and the device table and the warnings see only those protocols. --proto combines with filter words: a frame must match both (see "Capture filter"). An unknown or empty name is an error, and the message lists the known names. Like every option, --proto goes before the filter words.

--dhcp-server IP[@VLAN]

A DHCP server you expect. May be given several times (a failover pair, or one server per VLAN). Without @VLAN the server is expected on every VLAN. VLAN is an id from 0 to 4095; QinQ is written outer.inner. Id 0 is a priority tag, which counts as untagged (see "Segments and baselines"), so @0 pins a server for untagged traffic only. A VLAN that has at least one such server learns nothing on its own; see "WARNINGS".

--router MAC|IPV6[@VLAN]

An IPv6 router you expect, by MAC address or by link-local address, optionally for one VLAN only. May be given several times.

--max-memory size

A budget for the state overhear keeps (devices and what is known about them, warning state). A number with an optional K, M or G suffix (powers of 1024). The default is 64M and the smallest allowed is 4M. See "MEMORY".

-D

List the interfaces that can be captured from, one per line (name, description and addresses separated by tabs), and exit.

filter ...

Extra capture filter words in pcap-filter(7) syntax. They are joined with the built-in filter by and; see "Capture filter". Everything from the first filter word on is part of the filter, so options must come before it.

-h, --help, -V, --version

Print the help or the version and exit.

Capture filter

Without filter words overhear asks the kernel for just what it can decode:

ether broadcast or ether multicast or arp or udp port 67
or udp port 68 or udp port 137 or udp port 1900
or udp port 5353 or udp port 5355
or (icmp6 and ip6[40] >= 133 and ip6[40] <= 137)

(that is: broadcast and multicast frames, ARP, DHCP, NetBIOS name service, SSDP, mDNS, LLMNR, and the five IPv6 neighbour discovery message types). The same expression is also applied to frames carrying one VLAN tag and to frames carrying two (QinQ), because the pcap vlan keyword shifts everything after it.

Filter words you give are joined to that with and, for the untagged, the tagged and the QinQ arm alike. This narrows what is shown; it can never widen it. For example overhear -i eth0 host 192.168.1.1 shows only traffic to or from that host that the built-in filter also accepts.

--proto narrows the built-in filter in the same way, with the expressions of the protocols named joined by or. Given filter words as well, a frame must match both: overhear -i eth0 --proto dhcp host 192.168.1.1 shows only DHCP to or from that host. A combination that can match nothing, such as --proto nd host 192.168.1.1 (IPv6 neighbour discovery and an IPv4 address), is refused by libpcap with expression rejects all packets.

Limit: the filter looks through at most two VLAN tags. Unicast frames with three or more tags may therefore be missed, and with filter words so may broadcast and multicast frames with three or more tags.

OUTPUT

Line output

One line per packet, starting with the time (HH:MM:SS.mmm when capturing, with the date when reading a file), a protocol tag, the source (the IP address, or the MAC address when there is no IP or it is 0.0.0.0), and a summary. VLAN tags are shown as [100] or [200.100] (outer first) before the summary. A packet that decoded only partly ends with [malformed: layer reason]. Frames too short for Ethernet are shown as short frame.

Warnings and notes are lines of their own, directly after the packet that caused them:

WARN   a warning (see WARNINGS)
NOTE   a baseline just learned: "expected DHCP server ... (learned)"

Taken from the sample captures that ship with the tests (the DHCP scenario, which has rogue servers and one server on VLAN 100):

2026-11-21 13:02:11.000 DHCP  02:00:5e:10:00:39  DISCOVER from 02:00:5e:10:00:39 "host-a"
2026-11-21 13:02:11.250 DHCP  192.168.1.1        OFFER 192.168.1.50 to 02:00:5e:10:00:39
2026-11-21 13:02:11.250 NOTE  expected DHCP server 192.168.1.1 (learned)
2026-11-21 13:02:11.500 DHCP  192.168.1.254      OFFER 192.168.1.51 to 02:00:5e:10:00:39
2026-11-21 13:02:11.500 WARN  second DHCP server 192.168.1.254 (expected 192.168.1.1)

2026-11-21 13:02:12.500 DHCP  10.9.9.1           [100] OFFER 10.9.9.50 to 02:00:5e:10:00:3a
2026-11-21 13:02:12.500 NOTE  [100] expected DHCP server 10.9.9.9 (learned)

(The second pair of lines is lines 9 and 10 of the same sample.)

At the end of a run, a line on standard error gives the total:

N packets, N dropped by the kernel, N dropped by overhear, N devices

If the kernel or overhear drops frames while running, a capture-drops warning is shown at once, so that a quiet screen is not mistaken for a quiet network.

Verbose output

-v prints a block per packet: the time and length, then one indented line per layer (ETH, IPv4 or IPv6, UDP, the application protocol) and, for DHCP and the like, one line per option. Warnings and notes are printed as the same single lines as in line output. A DHCP offer:

2026-11-21 13:02:11.250  310 bytes
  ETH   02:00:5e:10:00:01 → ff:ff:ff:ff:ff:ff  type 0x0800
  IPv4  192.168.1.1 → 255.255.255.255  ttl 64 proto 17
  UDP   67 → 68  len 276
  DHCP  op 2 (BOOTREPLY) htype 1 (ethernet) hlen 6 hops 0 xid 3903f326 secs 0 flags 0x0000
        ciaddr 0.0.0.0 yiaddr 192.168.1.50 siaddr 192.168.1.1 giaddr 0.0.0.0
        chaddr 02:00:5e:10:00:39
        sname - file -
   53 DHCP Msg Type                2 (OFFER)
   54 DHCP Server Id               192.168.1.1
   51 Address Time                 3600s
    1 Subnet Mask                  255.255.255.0
    3 Router                       192.168.1.1

JSON OUTPUT

With -j every line is one complete JSON object. Every object has "schema":1 as its first member and a "type" member that says what it is. New members may be added in later versions; the schema number changes only when an existing member changes meaning.

The sample objects below are taken from the files shipped with the test suite. Some are shown with line breaks added; overhear itself writes each object on one line.

Line types

"type":"packet"

One per frame. Members:

ts

Capture time, seconds since the epoch with microseconds (a number such as 1795266131.000000).

time

The same instant as ISO 8601 text in the local time zone, with milliseconds and a UTC offset; null if it cannot be written as a date.

len

The length of the frame on the wire.

caplen

Only present when the capture kept less than the whole frame: the number of bytes captured.

vlan

Only present for tagged frames: an array of {"type":"C","id":100} objects, outermost tag first. The type is C for 802.1Q (0x8100), S for 802.1ad (0x88a8) and Q for the older 0x9100.

src, dst

Objects with mac and, when the frame carried an IP header, ip. Absent for frames too short to have an Ethernet header.

frag

Only for fragmented IP packets: "first" or "later". A later fragment has no transport header, so it is shown as other.

proto

The protocol of the payload, and the name of the member that holds its details: arp, dhcp, nd, mdns, llmnr, nbns, ssdp, lldp, cdp, stp or other. short is used for a frame too short to decode, and then there is no protocol member.

problems

Only present when the packet was damaged or odd: an array of objects with layer, reason, offset (into the frame) and hex (all the bytes the problem covers, starting at that offset; verbose output shows at most 32 of them). The rest of the packet is still decoded as far as possible.

frame_hex

With -H: the whole frame in hexadecimal.

"type":"warning"

A warning. Members: ts and time as above; rule (one of second-dhcp-server, unexpected-router, address-conflict, suspicious-name-answers, capture-drops, memory-eviction); severity ("high" or "low"); segment (the VLAN, "untagged" or a tag such as "200.100"; absent for capture-drops and memory-eviction); subject (what the warning is about, and the key used to limit repeats); message (the same text as the WARN line); macs and addrs (arrays of the MAC and IP addresses involved); count (1, or the number of occurrences a repeat summary stands for).

"type":"baseline"

What a segment learned to expect. Members: ts, time, segment, what ("dhcp-server" or "router"), ip and, for a router, mac.

"type":"status"

Drop and eviction counters. While running, a line with "final":false, ts (seconds, integer), kernel_drops, channel_drops and evictions is written whenever the drop counts grow. The last line of a complete run has "final":true, packets, kernel_drops, channel_drops, devices and evictions. A run that stops on an error (for example a truncated capture file) does not write the final line, so its absence means the output may be incomplete.

Packets

A frame with two VLAN tags (QinQ), outer tag first:

{"schema":1,"type":"packet","ts":1795266132.000000,"time":"2026-11-21T13:02:12.000+00:00","len":60,"vlan":[{"type":"S","id":200},{"type":"C","id":100}],"src":{"mac":"02:00:5e:10:00:05","ip":"10.0.0.5"},"dst":{"mac":"ff:ff:ff:ff:ff:ff","ip":"255.255.255.255"},"proto":"other","other":{"ethertype":2048,"ip_proto":17,"src_port":12345,"dst_port":9,"payload_len":5}}

An ARP request:

{"schema":1,"type":"packet","ts":1795266131.000000,"time":"2026-11-21T13:02:11.000+00:00","len":60,"src":{"mac":"02:00:5e:10:00:01"},"dst":{"mac":"ff:ff:ff:ff:ff:ff"},"proto":"arp","arp":{"op":1,"kind":"request","sender_mac":"02:00:5e:10:00:01","sender_ip":"192.168.1.20","target_mac":"00:00:00:00:00:00","target_ip":"192.168.1.1"}}

Fields that are not valid UTF-8 are written as the member's name with _hex added (for example name_hex) holding the bytes in hexadecimal, so that text from the network cannot break the JSON.

Protocol objects

arp

op, kind (request, reply, probe or announcement), sender_mac, sender_ip, target_mac, target_ip.

dhcp

op, op_text, htype, htype_text, hlen, hops, xid (hexadecimal text), secs, flags (number), ciaddr, yiaddr, siaddr, giaddr, chaddr, sname, file and options. Each option has code, name, len and value; some have text (for example "OFFER" for the message type). An option that could not be decoded has malformed (the reason) and hex instead of a decoded value. An option found in the sname or file fields (option overload) has source. sname and file are null when the overload option says those fields hold options.

nd

type is rs, ra, ns, na. Router advertisements have cur_hop_limit, flags, managed, other, lifetime, reachable, retrans; neighbour advertisements have flags, router, solicited, override, target; neighbour solicitations have target. All have options, an array whose members have a type: source_lla and target_lla (mac), prefix (prefix, len, on_link, autonomous, valid, preferred), rdnss (lifetime, servers) and route (prefix, len, pref, lifetime). A router advertisement sample:

{
  "schema": 1,
  "type": "packet",
  "ts": 1795266131.250000,
  "time": "2026-11-21T13:02:11.250+00:00",
  "len": 134,
  "src": {
    "mac": "02:00:5e:10:00:01",
    "ip": "fe80::1"
  },
  "dst": {
    "mac": "33:33:00:00:00:01",
    "ip": "ff02::1"
  },
  "proto": "nd",
  "nd": {
    "type": "ra",
    "cur_hop_limit": 64,
    "flags": 0,
    "managed": false,
    "other": false,
    "lifetime": 1800,
    "reachable": 0,
    "retrans": 0,
    "options": [
      {
        "type": "source_lla",
        "mac": "02:00:5e:10:00:01"
      },
      {
        "type": "prefix",
        "prefix": "2001:db8:1::",
        "len": 64,
        "on_link": true,
        "autonomous": true,
        "valid": 2592000,
        "preferred": 604800
      },
      {
        "type": "rdnss",
        "lifetime": 600,
        "servers": [
          "2001:db8::53"
        ]
      }
    ]
  }
}
mdns, llmnr

id, flags, response (boolean), questions (name, type, type_name, class, unicast_response) and records (section (answer, authority or additional), name, type, type_name, class, cache_flush, ttl, plus the fields of the record: addr, target, priority, weight, port, txt).

nbns

id, flags, response, opcode, rcode, questions (name, suffix, type) and records (name, suffix, type, ttl, entries with group and addr). name_hex replaces name when the name is not valid text.

ssdp

start (notify, m-search or response), status (the HTTP status for a response, otherwise null) and headers, an array of name and value (or value_hex).

lldp

tlvs, an array of objects with a type (chassis, port, ttl, port-descr, sysname, sysdescr, capabilities, mgmt, port-vlan, org) and its members (subtype, id, seconds, value, system, enabled, addr, vlan, oui, data_hex).

cdp

version, ttl and tlvs: device-id, addresses (addrs), port-id, capabilities (value, names), software, platform, vtp-domain, native-vlan (vlan), duplex (each with value).

stp

version, type, flags, topology_change, root, cost, bridge, port, message_age_256ths, max_age_256ths, hello_256ths, forward_delay_256ths, and for MSTP msti_count.

{"schema":1,"type":"packet","ts":1795266131.000000,"time":"2026-11-21T13:02:11.000+00:00","len":60,"src":{"mac":"02:00:5e:10:00:50"},"dst":{"mac":"01:80:c2:00:00:00"},"proto":"stp","stp":{"version":0,"type":0,"flags":0,"topology_change":false,"root":"8000.00:11:22:33:44:01","cost":4,"bridge":"8000.02:00:5e:10:00:50","port":32769,"message_age_256ths":0,"max_age_256ths":5120,"hello_256ths":512,"forward_delay_256ths":3840}}
other

Anything else that got through the capture filter, with ethertype; for IP traffic ip_proto, src_port, dst_port (TCP and UDP) or icmp6_type and icmp6_code; for LLC frames llc (dsap, ssap, ctrl); and payload_len.

{"schema":1,"type":"packet","ts":1795266131.000000,"time":"2026-11-21T13:02:11.000+00:00","len":60,"src":{"mac":"02:00:5e:10:00:05","ip":"10.0.0.5"},"dst":{"mac":"ff:ff:ff:ff:ff:ff","ip":"255.255.255.255"},"proto":"other","other":{"ethertype":2048,"ip_proto":17,"src_port":12345,"dst_port":9,"payload_len":5}}

Packets with problems

A frame that is damaged still produces a packet object, with the problems array. This ARP packet was cut off:

{"schema":1,"type":"packet","ts":1795266192.500000,"time":"2026-11-21T13:03:12.500+00:00","len":34,"src":{"mac":"02:00:5e:10:00:04"},"dst":{"mac":"ff:ff:ff:ff:ff:ff"},"proto":"other","other":{"ethertype":2054,"payload_len":20},"problems":[{"layer":"arp","reason":"truncated","offset":14,"hex":"000108000604000102005e100004c0a801280000"}]}

A frame too short for Ethernet:

{"schema":1,"type":"packet","ts":1795266132.250000,"time":"2026-11-21T13:02:12.250+00:00","len":13,"proto":"short","problems":[{"layer":"ethernet","reason":"truncated","offset":0,"hex":"ffffffffffffffffffffffffff"}]}

Warnings, baselines and the final status

{"schema":1,"type":"warning","ts":1795266131.500000,"time":"2026-11-21T13:02:11.500+00:00","rule":"second-dhcp-server","severity":"high","segment":"untagged","subject":"192.168.1.254","message":"second DHCP server 192.168.1.254 (expected 192.168.1.1)","macs":["02:00:5e:10:00:fe","02:00:5e:10:00:39"],"addrs":["192.168.1.254"],"count":1}

{"schema":1,"type":"baseline","ts":1795266131.250000,"time":"2026-11-21T13:02:11.250+00:00","segment":"untagged","what":"dhcp-server","ip":"192.168.1.1"}

{"schema":1,"type":"baseline","ts":1795266131.250000,"time":"2026-11-21T13:02:11.250+00:00","segment":"untagged","what":"router","ip":"fe80::1","mac":"02:00:5e:10:00:01"}

{"schema":1,"type":"status","final":true,"packets":13,"kernel_drops":0,"channel_drops":0,"devices":6,"evictions":0}

WARNINGS

overhear learns what is normal on each network and warns when something differs. Every warning is high or low severity. High means that it is very likely a problem (a rogue server, a poisoning tool); low means odd and worth a look.

Segments and baselines

Expectations are kept per VLAN segment: untagged traffic is one segment, each VLAN id is another, and a QinQ stack such as outer 200, inner 100 (written 200.100) is its own segment. A tag with VLAN id 0 (an 802.1p priority tag) does not make a segment: hosts treat such frames as untagged, and so does overhear, although the packet line still shows the tag as [0]. What a segment learned is announced once with a NOTE line (a baseline); in line output a tagged segment is shown with its VLAN as [100].

Learned state is kept for the untagged segment and for at most 256 VLAN segments. When a 257th VLAN segment appears the VLAN segment that was used least recently is forgotten and learns again later, so whoever speaks first there is trusted again. The untagged segment is never forgotten. A VLAN-hopping or VLAN-flooding attacker can use that, so pin the servers you care about.

Pinning expected servers

--dhcp-server IP[@VLAN] and --router MAC|IPV6[@VLAN] tell overhear what to expect. A segment with at least one pin of its own kind is never learned: only what you pinned is expected. A pin without @VLAN applies to every segment, a pin with @VLAN to that segment only. Pinned routers, and the senders of replies from pinned DHCP servers, are never evicted from the device table.

Rules

second-dhcp-server (high)

A DHCP OFFER, ACK or NAK carries a server identifier that is not the expected one. The first server a segment hears is learned (unless you pinned one); after that, any other server warns:

second DHCP server 192.168.1.254 (expected 192.168.1.1)

When several servers are pinned they are listed: expected 10.0.0.1, 10.0.0.2. A router option in a reply from an expected server is remembered as a gateway, so that an address conflict with it is high severity.

unexpected-router (high or low)

An IPv6 router advertisement. A sender with a router lifetime above zero is a default router: the first one on a segment is learned, as expected router fe80::1 (02:00:5e:10:00:01) (learned). A learned router must match on both its MAC address and its source address, so that a rogue copying only one of them still warns; a pinned router matches on either. Any other default router warns (high):

unexpected router fe80::3 (02:00:5e:10:00:03) advertising a default route

A sender with lifetime zero is not a default router and is quiet, unless it advertises DNS servers or a global prefix, which is warned about (low) as one of

router advert from fe80::2 (02:00:5e:10:00:02) carries DNS servers
router advert from fe80::2 (02:00:5e:10:00:02) carries a global prefix
router advert from fe80::2 (02:00:5e:10:00:02) carries DNS servers and a global prefix

Neighbour discovery packets (including router advertisements) whose IPv6 hop limit is not 255 cannot have come from the local link. They are shown, with a problem noted, and the sender counts as heard, but nothing else is learned from them and they never cause a warning.

address-conflict (low, or high)

An IP address (from an ARP request, reply or announcement, or an IPv6 neighbour advertisement) is claimed by a different MAC address than before. ARP probes (sender address 0.0.0.0) are not claims. The warning is high when the address is an expected DHCP server, a gateway named by one, or an expected router; low otherwise, since a changed address is often a harmless move or a DHCP lease handed on.

192.168.1.50 now claimed by 02:00:5e:10:00:0b, was 02:00:5e:10:00:0a 1m ago

The age is shown in seconds, minutes or hours.

suspicious-name-answers (low or high)

For LLMNR, NetBIOS and mDNS unique records. Two kinds:

(low) One name answered by two different devices with different answers within five minutes:

name FILESERVER<20> answered by 02:00:5e:10:00:41 and 02:00:5e:10:00:40

(high) One device answering LLMNR or NetBIOS queries for three different names within five minutes, the pattern of tools such as Responder:

02:00:5e:10:00:66 answers LLMNR queries for many names (wpad, fileserver, printer): the pattern of poisoning tools such as Responder
capture-drops (low)

Frames were dropped by the kernel or by overhear itself:

N frames dropped (K by the kernel, C by overhear)
memory-eviction (low)

The memory budget was reached and the least recently heard devices were dropped. A flood of fake MAC addresses causes this:

device table full, dropping least recently heard devices: possible MAC flood

Repeats

The first occurrence of a warning is shown at once. Further occurrences of the same rule, severity, segment and subject are counted, and summarised at most once a minute, with the count:

... (repeated 12 times in the last minute)

and the summary is also written when the run ends. A subject that stays quiet for ten minutes is forgotten. At most 4096 distinct subjects are kept; beyond that the one that has been quiet longest is replaced.

WHAT A PASSIVE LISTENER CAN SEE

overhear sees what the network delivers to the port it listens on.

On a switch, broadcast and multicast traffic reaches every port, so DHCP discovers and offers, ARP requests, router advertisements, mDNS, SSDP, LLMNR, NetBIOS announcements, LLDP, CDP and spanning tree are all visible from an ordinary port.

Unicast traffic between two other devices is not: a switch sends it only to the port of the destination. Typical consequences are:

You see unicast replies only if

For a thorough survey, listen from a mirror port. On a mirror port take care that the mirror may be oversubscribed (the kernel's drop counter then rises; see the capture-drops warning). VLAN tags are seen only if the port delivers them tagged (a trunk or a mirror); an access port delivers them untagged and the VLAN is then not visible.

NAME LOOKUPS

overhear itself never sends anything and never resolves names. The capture filter words you give on the command line are compiled by libpcap, and libpcap resolves host names and service names in them by the system's resolver. That resolver may send DNS queries.

If you need strict silence, write the filter with numeric addresses and port numbers only:

overhear -i eth0 host 192.168.1.1 and udp port 67

and not host router.example.

The user named with -Z (or nobody) is looked up when overhear is started as root, through the system's user database (NSS, see nsswitch.conf(5)). With a network source such as LDAP or SSSD configured there, that lookup may send queries too.

PRIVILEGES

Capturing needs privilege, which overhear gives up as soon as the capture is open, before any packet is decoded.

Started as root

overhear switches to the user given with -Z (default nobody): it sets the group, the supplementary groups and the user id, checks that it can not become root again, clears all capabilities and sets no_new_privs. If the user does not exist, or any step fails, overhear exits with an error instead of running with more privilege than intended.

Started by an ordinary user with file capabilities

For example after

sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/overhear

overhear clears all capability sets (permitted, effective, inheritable and ambient) and sets no_new_privs. -Z is ignored, with a note on standard error.

MEMORY

--max-memory bounds the state that overhear tracks: the device table (addresses, names, services and so on per device) and what the warning rules remember. When the device table reaches the budget the least recently heard devices are dropped, with a memory-eviction warning.

The cap is approximate. It does not include the packet buffers, the program itself or what the libraries use, so the resident set size is the budget plus a fixed overhead. The flood test in the source tree (a million frames from different MAC addresses) checks that with the default of 64M the process stays below 112 MiB.

KEYS

In the -t view:

q            quit (also Ctrl-C)
Up, Down     move the selection (scroll the warnings when they have focus)
PageUp, PageDown, Home, End
Enter        details of the selected device (Esc to go back)
s            change the sort order (heard, mac, ip, name, vendor, packets)
/            filter the table; Enter or Esc to finish
w            move the focus to the warnings list and back
p            pause the table

EXIT STATUS

0

The run ended normally: the end of the capture file or of standard input, q in the full-screen view, SIGINT (Ctrl-C) or SIGTERM (the frames already captured are shown first), the reader of a pipe went away, or --help, --version or -D succeeded.

1

Anything else: a bad command line, options that cannot be combined, an interface or file that cannot be opened, a capture filter that does not compile, a link type other than Ethernet, a user that does not exist, a failure to drop privileges, a truncated capture file (after what could be read was shown), or a failure while capturing or writing.

A second Ctrl-C (or SIGTERM) while the first is still being handled stops overhear at once.

EXAMPLES

Watch the LAN on eth0 as one line per packet (as root; overhear switches to nobody):

sudo overhear -i eth0

The same as an ordinary user, after setcap:

overhear -i eth0

Full-screen:

overhear -t -i eth0

JSON for a program, with the warnings:

overhear -j -i eth0 | jq -c 'select(.type=="warning")'

Read a recording, and show only what concerns one host:

overhear -r capture.pcap host 192.168.1.1

A recording from tcpdump, read from a pipe:

tcpdump -i eth0 -w - -s 0 | overhear -r -

Only DHCP and mDNS:

overhear -i eth0 --proto dhcp,mdns

Only DHCP to or from one server (--proto and filter words together):

overhear -i eth0 --proto dhcp host 192.168.1.1

Expect one DHCP server on all VLANs, and a different one on VLAN 20:

overhear -i eth0 --dhcp-server 192.168.1.1 --dhcp-server 10.20.0.1@20

Expect one IPv6 router, by MAC address:

overhear -i eth0 --router 02:00:5e:10:00:01

Keep memory small on a Raspberry Pi:

overhear -t -i eth0 --max-memory 16M

SEE ALSO

pcap-filter(7), tcpdump(8), capabilities(7)

AUTHOR

Don Steele