Remix.run Logo
Show HN: Dsnitch – Real-time, zero-config Docker egress inspector via eBPF(github.com)
5 points by infomaniac777 a day ago | 3 comments

Hi HN, I built dsnitch because I wanted a zero-config, bandwhich-style live TUI to see what my homelab Docker containers are connecting to—without running sidecar proxies, modifying container configs, or relying on reverse DNS (fails on anycast CDN IPs). Just run the binary and it automatically discovers running containers.

Under the hood, it's written in Rust and attaches eBPF probes to the unified cgroup v2 hierarchy and TCP state tracepoints. To map IPs back to domain names accurately, it passively snoops raw UDP/53 DNS responses per cgroup and decodes them in userspace using Hickory DNS. The terminal interface is built with Ratatui.

It targets Linux 5.8+ and does not modify or filter network packets in any way. It's strictly read-only.

Happy to answer questions or hear your feedback!

coder-pm 18 hours ago | parent [-]

This is great, I was already doing research in that area for my tool. What about a container that writes to the /etc/hosts? It won’t emit DNS queries at all and because of that the connections will show up as bare IPs without domain. That’s a known trick, already exploited (collusion.wiki mentioned here on HN two days ago)

infomaniac777 12 hours ago | parent [-]

Good point. Yeah, there will not be a DNS name mapping for such an IP. TBF, that's also gonna be the case if there is a hardcoded IP inside the container. With that said, the actual network connection(w/o the DNS name resolution) will still show up here because ultimately it has to open a socket if/when it connects. It will still give you that attributed to the container in dsnitch for further analysis.

coder-pm 35 minutes ago | parent [-]

Hm and does name mapping still work if the user is using docker compose? it creates a user-defined network and resolv.conf is 127.0.0.11 rather than the host resolver