carbonian.org / manual pages
CARBONIAN-NETWATCHD(8) Carbonian Manual CARBONIAN-NETWATCHD(8)

carbonian-netwatchd - the network-egress monitor's daemon

systemctl start carbonian-netwatch
/usr/local/lib/carbonian-netwatch/carbonian-netwatchd

Runs as the system service carbonian-netwatch.service and writes a local log of what leaves the machine. It is a development tool: no package ships it. Use carbonian-netwatch(1) to start, stop and read it.

It reads copies of packets from one read-only AF_PACKET socket (every interface, or those named in netwatch.conf, and the loopback; interfaces without a link header, such as WireGuard and tailscale0, from their IP header) and records:

The process is found at capture time: the source port in /proc/net/{tcp,udp}{,6}, then the owner of the socket inode in /proc/*/fd. An address is mapped to a name from the DNS answers seen (their TTL plus ten minutes); a name in the log under name_src dns is a guess, under sni exact.

The log holds names, addresses, ports, process data and the request line of plain HTTP. It never holds a packet payload, a cookie, any header but Host, or a body. The daemon opens no connection of its own, sends nothing, and changes no network configuration, firewall or resolver; it adds no nftables table. Its only sockets are the capture socket and the control socket.

The unit runs as root with only CAP_NET_RAW, CAP_SYS_PTRACE and CAP_DAC_READ_SEARCH (to read other users' sockets and command lines in /proc), CAP_CHOWN and CAP_FOWNER (the group and mode of the log); no new privileges; a read-only file system except the log directory; only AF_PACKET and AF_UNIX sockets.

A native program in Rust (devtools/netwatch/netwatchd in the carbonian repository), built for x86-64 and for the Raspberry Pi 2 (armv7, Cortex-A7). A packet that would make it fail is counted and logged as an error event at most once a minute; the daemon goes on.

/etc/systemd/system/carbonian-netwatch.service
/etc/carbonian/netwatch.conf
Read once at start (the system file only).
/var/log/carbonian-netwatch/
Day files YYYY-MM-DD.jsonl, mode 640 root:adm, directory 750 root:adm. Files older than keep are deleted at start and daily.
/run/carbonian-netwatch/control.sock
Group adm, mode 660. Accepts mark TEXT and status.

carbonian-netwatch(1), netwatch.conf(5)

October 2026 Carbonian