A blazingly fast, Rust-based TUI connection monitor for OpenWrt, specializing in MediaTek Hardware Offloading (PPE & WED) analytics.
Conntracktor is a lightweight Terminal User Interface (TUI) utility designed for modern OpenWrt routers. While standard tools like top only show CPU usage, they completely miss the massive amount of traffic being processed by hardware accelerators. Conntracktor looks under the hood of netfilter to show you exactly what connections are active, where they are coming from, and whether they are bypassing the CPU via hardware offloading.
Compatibility: Developed and thoroughly tested on the MediaTek MT7981 (Filogic 820), with full dynamic support for the broader MediaTek family via Device Tree detection:
Filogic (modern ARM):
- MT7988 (Filogic 880, Wi-Fi 7)
- MT7987 (Filogic 850, Wi-Fi 7 entry)
- MT7986 (Filogic 830, Wi-Fi 6/6E)
- MT7981 (Filogic 820, Wi-Fi 6)
- MT7622 (Filogic 800, Wi-Fi 6 / early ARM)
Legacy:
- MT7629 (Wi-Fi 5)
- MT7621 (Wi-Fi 5 / MIPS)
- MT7628 (Wi-Fi 4/5 budget)
- MT7620 (Wi-Fi 4/5 budget)
It also gracefully falls back to standard software metrics on any generic OpenWrt device supporting nf_conntrack.
- Real-time Connection Tracking: View total active vs. maximum allowed connections.
- Smart Traffic Classification: Automatically categorizes active sessions into:
- π§ Router (Local): Traffic generated by the router itself (e.g., NTP, OPKG/APK).
- π₯οΈ Wired: LAN client connections.
- πΆ Wi-Fi: Wireless client connections.
- π‘οΈ VPN: Virtual Private Network endpoints (WireGuard, OpenVPN, Tailscale).
- π Remote: Public Internet addresses.
- π’ Multicast: Multicast and broadcast traffic (e.g., IPTV, mDNS, IGMP, OSPF).
- β Unknown: Uncategorized private subnets or ISP management equipment.
- Hardware Offload Analytics:
- Tracks connections accelerated by the PPE (Packet Processing Engine), indicated by
[HW_OFFLOAD]. - Infers WED (Wireless Ethernet Dispatcher) usage by correlating hardware-offloaded sessions with wireless interfaces.
- Tracks connections accelerated by the PPE (Packet Processing Engine), indicated by
- Dynamic SoC Adaptation: Automatically detects your router's chipset via the Linux Device Tree to adjust the layout and accurately report on all available PPE/WED engines.
- Zero Disk I/O: Specifically designed for routers with slow or restricted eMMC storage. All data is parsed directly from RAM (
/procand/sys), and the binary runs flawlessly fromtmpfs. - Low CPU Footprint: Written in safe, compiled Rust with a highly optimized render loop.
Main interface
β π Conntracktor v0.1.0 ββββββββββββββββββββββββββββββββββββββββ [ press ? for help ] β
β OpenWrt β OpenWrt 25.12-snapshot β Uptime: 2d 12h β CPU: 2% β RAM: 370/986 MB β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Active Connections [ 544 / 63488 ] βββββββββββββββββββββ[CPU: 510] [SW: 7] [PPE: 27] β
β PROTO SOURCE IP DESTINATION IP STATUS OFFLOAD β
β β
β>> UDP π§ 168.27.134.47 π 221.298.97.183 CPU β
β UDP π§ 168.27.134.47 π 5.79.78.211 CPU β
β UDP πΆ 192.168.1.30 πΆ 192.168.1.116 CPU β
β TCP π 18.146.193.61 π§ 168.27.134.47 ESTABLISHED CPU β
β UDP π 37.16.72.197 π§ 168.27.134.47 CPU β
β UDP π 142.51.63.179 π§ 168.27.134.47 CPU β
β UDP π 65.38.65.161 π§ 168.27.134.47 CPU β
β UDP π 16.119.112.248 π§ 168.27.134.47 CPU β
β TCP πΆ 192.168.1.96 π 87.58.147.204 dst=87.58.147.2 HW (PPE) β
β UDP πΆ 192.168.1.116 πΆ 192.168.1.30 SOFTWARE β
β UDP π 185.168.238.27 π§ 168.27.134.47 CPU β
β UDP π 54.32.177.27 π§ 168.27.134.47 CPU β
β UDP π 14.135.142.7 π§ 168.27.134.47 CPU β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Other panels
ββ Hardware ββββββββββββββββββββββ [ Hardware support only. Software may be disabled ] β
β SoC MediaTek MT7986AV (Filogic 830) β
β CPU 2Γ Cortex-A53 @ 1300 MHz β
β Memory 1 GB DDR4 @ 3200 MT/s β
β Switch Airoha AN8855 @ 2.5G Gbps β
β Flash FORESEE F35SQA001G (eMMC) β
β Misc USB 3.2 Gen1 (5G) β
β β
β Networking Security β
β PPE β Crypto Engine β β
β WED β AES β β
β RSS β SHA β β
β Checksum Offload β TRNG β β
β TSO β Secure Boot β β
β Multi RX Queues β TrustZone (TEE) β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Packet Pipeline βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Hardware offload: β
β PPE: β enabled (1 table) β
β WED: β enabled (2.4GHz, 5GHz) β
β β
β Software processing: β
β RPS: β enabled β CPU1 β
β XPS: β disabled β
β Flow table: β disabled β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Network Queues ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β eth0 β
β RX queues: 1 β
β rx-0 RPS: CPU1 β
β β
β TX queues: 16 β
β β
β DMA: RX rings: 1 TX rings: 16 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Interrupts ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Device IRQ CPU0 CPU1 β
β β
β Ethernet 75,76 7.9M 0 β
β WiFi 73 39.6M 0 β
β MMC 78 0.2M 0 β
β USB 0 0 β
β β
β IRQ affinity: concentrated on CPU0 β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ SoftIRQ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NET_RX NET_TX β
β CPU0 6.2M 5.3M β
β CPU1 4.7M 9.2M β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Packet Processing βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RSS: OFF (RX queues: 1) β
β RPS: ON β
β RPS CPUs: CPU1 β
β RPS flow table: OFF β
β XPS: OFF β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Hardware Offload ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PPE0: 15234/32768 [ββββββββββββ] WED0(2.4G): 512/2048 [ββββββββββββββββ] β
β PPE1: 28192/32768 [ββββββββββββ] WED1(5G): 1892/2048 [ββββββββββββββββ] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Software Fast Path ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend: nftables β
β Status: enabled β β
β β
β Tables: 1 β
β Flows: 150 / 4096 β
β β
β Devices: β
β eth0 β β
β br-lan β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Help ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Navigation β
β β β / j k Move selection β
β Enter Expand selected β
β Space β
β Tab β
β β
β Panels β
β 1 Hardware β
β 2 Packet Pipeline β
β 3 Network Queues β
β 4 Interrupts β
β 5 SoftIRQ β
β 6 Packet Processing β
β 7 Hardware Offload β
β 8 Software Fast Path β
β β
β Actions β
β r Refresh β
β p Pause updates β
β e Export diagnostics β
β ? Toggle help β
β q Quit β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Modern MediaTek Filogic (MT798x) SoCs include two independent hardware acceleration engines that dramatically reduce CPU utilization during packet forwarding. Although they are often mentioned together, PPE and WED solve different problems and operate independently.
The Packet Processing Engine (PPE) is a dedicated hardware accelerator responsible for forwarding established network flows without traversing the full Linux networking stack.
After the first packets of a connection are processed by the kernel (connection tracking, firewall, NAT, routing, etc.), compatible flows can be offloaded into the PPE through Linux nftables flowtables. Once offloaded, subsequent packets are forwarded almost entirely in hardware.
PPE accelerates:
- IPv4 routing
- NAT
- PPPoE
- VLAN forwarding
- Checksum calculation
- Long-lived TCP/UDP flows
In addition, the hardware is capable of supporting:
- bridge forwarding
- multicast forwarding
- hardware flow aging
- packet classification
- ACLs
- QoS/traffic prioritization
Support for these advanced capabilities depends on the Linux driver and OpenWrt implementation.
The Wireless Ethernet Dispatcher (WED) is a dedicated accelerator for the Wi-Fi data path.
Unlike the PPE, WED does not perform routing, NAT, firewalling or packet inspection. Its only responsibility is to accelerate packet movement between the Wi-Fi subsystem, DMA engines and the rest of the networking pipeline.
WED improves performance by:
- reducing interrupt frequency
- managing RX/TX DMA rings
- accelerating descriptor processing
- recycling packet buffers
- optimizing DMA queue handling
- improving burst traffic handling
- reducing CPU cache pressure
The result is significantly lower CPU utilization while maintaining high Wi-Fi throughput.
Although completely independent hardware blocks, PPE and WED complement each other.
For Wi-Fi to Ethernet traffic:
- WED accelerates packet movement inside the wireless subsystem.
- Linux processes only the first packets required to establish a flow.
- The flow is installed into the PPE.
- All subsequent packets bypass most of the Linux networking stack.
This architecture enables MediaTek Filogic routers to sustain near wire-speed routing while keeping CPU utilization extremely low.
Since routers run on specific architectures (like ARM64 for MediaTek MT7981B) and use musl-libc, the easiest way to compile Conntracktor is using cross.
Install Rust and cross on your development machine:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install crossgit clone https://github.com/yourusername/conntracktor.git
cd conntracktor
# Cross-compile for aarch64 with musl (MT7981 / Filogic 820)
cross build --target aarch64-unknown-linux-musl --release/tmp (which is tmpfs / RAM).
# Copy the compiled binary to the router's RAM
scp target/aarch64-unknown-linux-musl/release/conntracktor root@192.168.1.1:/tmp/
# SSH into the router and run the monitor
ssh root@192.168.1.1
/tmp/conntracktorCurrently, Conntracktor auto-detects ethX, lanX for wired connections and wlanX, phyX for wireless interfaces. If you have custom interface names (e.g., VLANs, WireGuard), you can map them in an optional config file or via CLI arguments (coming in v0.2).
This project is licensed under the MIT License - see the LICENSE file for details.