Skip to content

Infraw/packet-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Packet Counter

A high-performance packet counter written in Rust that intercepts traffic using Linux Netfilter Queues (NFQUEUE).

This project demonstrates how to interface Rust with the Linux kernel, manage iptables rules programmatically, and safely handle system signals (Ctrl+C).

How to Run

Because this program interacts with kernel queues and firewalls, it requires root privileges. However, cargo should be run as your normal user.

  1. Build the project (as normal user):
cargo build
  1. Run the binary (as root):
sudo ./target/debug/packet_counter

About

A simple network traffic counter to monitor RX/TX packets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages