Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

Visualize how packets traverse Linux Netfilter hooks across devices, bridges, and the IP layer in a live browser view.

103
5
Go
MIT
3 days old

What it does

PathViz traces packets through the Linux Netfilter hooks and draws their route live in a browser. It covers the netdev ingress/egress hooks of network devices, the bridge family hooks, and the five inet hooks (PREROUTING, INPUT, FORWARD, OUTPUT, POSTROUTING), with their raw, mangle, nat, and filter stages. The diagram also names the interfaces, bridges and ports, container/pod networks, and processes with listening sockets around those hooks.

It is aimed at people learning or teaching Linux networking and firewalls: which hooks a packet crosses and in what order, where it is dropped, what NAT rewrites and when, how a bridge floods or forwards frames, and whether br_netfilter exposes bridged traffic to the IP firewall. PathViz only observes: it logs packets through nftables probe chains and NFLOG, never altering or stopping them. A combined view places the packet's whole way from device through bridge to socket on one diagram.

Quick start

On the Linux machine whose traffic you want to inspect, PathViz needs root, nft, ip, bridge, ss, nsenter, and the nfnetlink_log kernel module. The device egress hook requires Linux 5.16+ with CONFIG_NETFILTER_EGRESS; without it only ingress is shown.

The quickest path is the local demo, which additionally needs Go, python3, and curl:

git clone https://github.com/iximiuz/pathviz.git
cd pathviz
make demo-local

For a normal install, download the release binary and put it on PATH:

arch=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')
curl -L "https://github.com/iximiuz/pathviz/releases/latest/download/pathviz_linux_${arch}.tar.gz" | tar xz pathviz
sudo install -m 0755 pathviz /usr/local/bin/pathviz

Then start it:

sudo pathviz

It prints a URL such as web UI on http://127.0.0.1:7070/?token=...; open that URL in a browser on the same machine. By default all traffic is traced; narrow it with flags like --port 8080, --iface eth0, --ip 10.0.0.1, or --netns <name>. To produce traffic, run a local HTTP server and request it from another machine:

python3 -m http.server 8080          # on the PathViz machine
curl http://<machine>:8080/          # from another machine

Ready-made scenarios for routing, bridges, and containers are in the repository routing demo, bridges demo, and containers demo, each with an iximiuz Labs playground to run it in safely.

Access and security

The web UI requires a token generated on each start; the browser stores it for that address and port, so the plain http://127.0.0.1:7070 URL works until restart. Use --token-file <path> or PATHVIZ_TOKEN for a persistent token. The token is effectively a password: it grants visibility of addresses, ports, process names and PIDs, packet contents up to 2048 bytes, and the ability to change the capture filter and nftables rules installed as root. The UI is plain HTTP on localhost by default; prefer SSH port forwarding or a TLS reverse proxy instead of --listen 0.0.0.0, and treat --dangerously-skip-token as isolated-environment-only. --no-packet-view disables payload retention.

Limits

  • One network namespace per picture; a packet leaving a container for the host appears as separate packets in the container and host namespaces.
  • NAT can hide hooks from the device and bridge probes, so capture filters on addresses or ports that NAT rewrites may truncate the combined view.
  • XDP and tc run outside the probed hooks and are not shown; drops inside a bridge itself appear without a reason, and individual firewall rules that matched are not identified.
  • The packet view decodes each packet independently, without TCP stream reassembly, and includes at most 2048 bytes per packet.
  • Traffic spikes can drop probe events, and PathViz then warns about affected packets.
  • Built for learning and demos at a few packets per second, not for high-volume capture.

HotRepo's take

PathViz entered HotRepo's new-project snapshot on 2026-11-27, at 103 stars and 5 forks, with 3 stars gained over the recorded one-hour growth window in the Go list. That is a very short series: it supports only the fact that the project was being picked up on that day, not a trend claim. The interesting part for readers is the positioning the code itself reveals: three nftables probe tables, per-stage probes in the IP layer, and packet identity tracking across NAT give it more precision than a plain hook-order diagram, while the README is explicit that it is a teaching tool with per-namespace and NAT-filtering caveats rather than a capture system.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.