CLI-Anything Bundle #72 — Dnsmasq DNS/DHCP Trust Recon Pack
Four agent-native read-only harnesses that census the dnsmasq DNS/DHCP trust surface: the layers that decide whether a LAN's name and address authority can still be TRUSTED — the install + service trust posture (binary statted never executed, conf surfaces, lease files stat-only, unit posture), the dnsmasq.conf grammar + dnsmasq.d drop-in layer (forwarder stances, exposure law, DNSSEC hardening, privacy posture), the DHCP lease-file grammar census under a strict privacy cap (values never printed), and the hosts-layer + resolver coherence census (/etc/hosts, /etc/ethers, resolv.conf, nsswitch). No other bundle owns this surface — #53 keeps the audit-rules layer, #63 the bootloader/EFI layer, #66 the AIDE integrity layer, #67 the firejail sandbox layer, #68 the USBGuard device-authorization layer, #69 the rootkit/malware-detection layer, #70 the watchdog keepalive layer, #71 the ZeroTier mesh-join layer (census: 0 exact / 0 name-class substring token hits across the fresh full-catalog union — 1,412 union stems across 147 listing zips, 144 Gumroad products pulled fresh — the dnsmasq DNS/DHCP trust layer is unclaimed census territory).
The four tools
- dnsmasqpeek — install + trust-posture census: standard-path binary census STRICTLY stat-only (BINARY_ABSENT/BINARY_PRESENT perm rows — the binary is never executed), /etc/dnsmasq.conf presence+perm, dnsmasq.d drop-dir census, lease files stat-only, /etc/ethers presence, systemd unit lookup with enablement hints + init.d fallback, resolv.conf LOOPBACK_RESOLVER posture, CONF_BINARY_DRIFT / UNIT_ABSENT drift findings, staleness buckets, honest ABSENT/UNREADABLE rows. rc6 NOTHING-READABLE.
- dnsmasqconfpeek — dnsmasq.conf grammar + drop-in layer: server=/local=/domain=/expand-hosts forwarder stances, interface= + bind-interfaces EXPOSURE law (BIND_EXPOSURE), except-interface + listen-address rows, dhcp-range flag classes, dhcp-option class rows (option-6 push), port law (PORT_STANDARD / port=0 DNS_DISABLED / UNPARSEABLE), no-resolv ORPHAN_FORWARDER law, dnssec + DNSSEC_UNANCHORED, log-queries PRIVACY_LOGGING posture, dhcp-leasefile override, conf-file=/conf-dir one-hop include layer with cycle guard, UNPARSEABLE rows never crash. rc6.
- dnsmasqleasespeek — DHCP lease-file grammar census under a strict privacy cap: 5-field line grammar + UNPARSEABLE rows, expiry classes EXPIRED/VALID/INFINITY + staleness buckets, clientid classes (* / duid: / bssid:) CLASS ONLY, duplicate-MAC/duplicate-IP COUNT-ONLY law (MAC/IP/hostname/clientid VALUES never printed), dual-lease-loci, EMPTY_LEASES, UNREADABLE findings, mtime staleness. rc6.
- dnsmasqhostpeek — hosts-layer + resolver coherence census: /etc/hosts (+ addn-hosts targets) by record class with privacy cap (duplicate-IP/duplicate-hostname COUNT-ONLY), 0.0.0.0 sinkhole rows, ::1 coherence, LOCALHOST_DRIFT, /etc/ethers grammar, resolv.conf loopback vs non-loopback stances + search/domain/options, nsswitch hosts: ordering, ORPHAN_INTEGRATION / INTEGRATION_ABSENT coherence laws. rc6.
Self-test batteries inside: 919 checks, fired twice from the merged tree + clean-room fires from this exact shipping zip, 0 failed. Exit codes honest by contract (0 clean / 4 findings / 6 nothing-readable / 3 usage); --version prints exactly "1.0.0 (CLI-Anything Bundle #72)".
Who this is for
Home-lab and edge operators whose dnsmasq install, conf grammar, lease history and host/coherence posture still form a closed loop; agent builders who want their AI to census a LAN's DNS/DHCP trust surface without ever touching a secret, serving a query or executing the binary. The census reads — your resolver is never asked a question.
MIT licensed · Python 3.8+ · 40 files · stdlib-only