LINUX  ยท  NETLINK_NETFILTER  ยท  ZERO DEPS

proc-trace-net

Watch every TCP and UDP connection on your Linux system โ€” in real time, with PID, process name, direction, and close timing. No eBPF. No ptrace. No kernel modules.

proc-trace-net โ€” bash
$ sudo proc-trace-net -ctu
 1234 sshd        <root>  TCP  10.0.2.15:22              โ†  203.0.113.7:41002
 2341 systemd-r   <root>  UDP  10.0.2.15:46012           โ†’  8.8.8.8:53
 3892 curl        <rick>  TCP  10.0.2.15:54321           โ†’  93.184.216.34:443
 4401 dockerd     <root>  TCP  10.0.2.15:55001           โ†’  52.1.0.1:443
 3892 curl        <rick>  TCP  10.0.2.15:54321           ร—  93.184.216.34:443   0.342s
๐ŸŒ

System-Wide

Every TCP/UDP connection on the machine โ€” not just children of your shell. One netlink socket, full visibility.

๐Ÿ”

PID + Name

/proc/net/tcp inode lookup maps each connection to its owning process name and PID.

โ†”๏ธ

Direction

โ†’ outbound, โ† inbound โ€” direction is determined by which side initiated the connection.

โฑ๏ธ

Close Timing

The -t flag shows elapsed duration when a connection closes. Spot long-lived or hung connections instantly.

๐Ÿ”„

TCP State Updates

The -U flag shows ESTABLISHED, FIN_WAIT, and TIME_WAIT transitions as they happen.

๐Ÿ“ฆ

Zero Dependencies

Single static binary. Uses a netlink socket + /proc only โ€” no eBPF, no ptrace, no kernel modules.

Built to answer one question: what is my system actually talking to?

Which process opened that outbound connection to an unexpected IP? When a script runs, does it phone home? Which service is hammering your DNS resolver with queries?

Existing tools are painful: ss and netstat are polling-based and miss short-lived connections. tcpdump captures packets but doesn't map them to PIDs. eBPF requires kernel 5.8+ and significant setup.

proc-trace-net answers these questions with one command and one static binary โ€” subscribing to the kernel's conntrack event stream rather than polling or intercepting packets.

How it works in one sentence: the Linux kernel tracks every TCP/UDP connection through conntrack and broadcasts lifecycle events over a netlink socket โ€” proc-trace-net subscribes to that stream and formats it.
System-wide network connection monitoring
๐Ÿ”

Security Auditing

Watch outbound connections from untrusted scripts or packages before you trust them. Does it call home? You'll see it immediately.

๐Ÿ›

Connection Debugging

See exactly which process is connecting where, in real time. No more guessing from ss snapshots that miss short-lived connections.

๐ŸŒฟ

Subtree Filtering

Use -p PID to trace only one service's network traffic. Watch nginx workers, a microservice, or any process group in isolation.

๐Ÿ“Š

Network Profiling

Count connections in hot paths, spot chatty processes making excessive DNS lookups, or identify services with unexpected connection patterns.

๐Ÿณ

Container Inspection

Trace docker pull, docker build, and docker run network activity from the host โ€” see every registry and CDN endpoint contacted.

๐ŸŽ“

Learning

Understand how programs use the network at the syscall level. A great way to explore unfamiliar daemons or understand what a system is doing on the wire.