NSNTRACE(1)
β¨ NSNTRACE(1) β the nsntrace manual, but make it cute β¨
okay bestie, sit down, hydrate, and let me tell you about nsntrace from the nsntrace manual. she does network traces of a process using Linux network namespaces and honestly? iconic. π
πΈ NAME πΈ
nsntrace β do a network trace of a process by using Linux network namespaces π¦
π SYNOPSIS π
nsntrace [options] program [arguments]
like. that's it. that's the whole vibe. options first, then the program you're tracing, then whatever arguments that program wants. β¨
π DESCRIPTION π
so the tea is: nsntrace uses Linux network namespaces to perform network traces of the program you picked. the traces get stored as pcap files, and later you can analyze them with applications like wireshark. she's giving forensic scientist, she's giving main character energy. π₯
here's the lowkey genius part: nsntrace creates a new network namespace and launches the specified program inside it. this makes sure every single packet we trace actually comes from the system or from the program you specified. no stray packets crashing the party. π«Ά
now, network namespaces are super isolated (as they should be π
), and to get around that isolation a virtual network interface gets created. and so that the program's network traffic can actually reach the root network namespace, iptables is used. yeah, the whole thing is a little network plumbing situation and it works. obsessed.
π real talk though: becausensntraceusesiptablesand traces raw sockets, it needs to be run as root. no getting around it, bestie. sudo up. π
β¨ OPTIONS β¨
the following options are understood. yes, all of them. here we go:
--device dev,-d devβ the network device to use in the trace. pick your interface, diva. π--use-public-dnsβ overrideresolv.confin the namespace so it uses public nameservers from Quad9 (9.9.9.9), Cloudflare (1.1.1.1), Google (8.8.8.8) and OpenDNS (208.67.222.222). DNS drama? not today. β¨--outfile file,-o fileβ write the trace output to the filefile. the default isnsntrace.pcap. and if you pass'-'she writes to stdout instead. flexible queen. π--user user,-u userβ runprogramwith the user ID, group ID and supplementary groups ofuser. dropping privileges, we love to see it. π--filter filter,-f filterβ the capture filter to use while capturing. for filter syntax, go check outpcap-filter(7). iykyk. π¦
π EXIT STATUS π
on success, 0 is returned. otherwise, a non-zero failure code is returned. so if you get a zero, she ate. if you don't, something went sideways and that's your sign. π«Ά
π AUTHOR π
Jonas Danielsson <jonas@threetimestwo.org>
- original author π
and that's the whole page, bestie! this was the nsntrace manual, dated 05/25/2026, from the nsntrace source. go trace something (as root, pls) and slay responsibly. periodt. πβ¨π
π¦ where this page comes from
- ubuntu stonking: nsntrace 4.6.ged3532e-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms