Skip to content

adilcan/dropify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dropify - eBPF Packet Dropper

TODO: Forgot to add the bpf loader for the ((current)) main go lol.

THIS IS AN EXPERIMENTAL PROJECT. NEVER USE IT ON YOUR PROD OR NEVER RELY ON IT!

This project uses eBPF and Go to drop TODO packets on a specified network interface using Traffic Control (TC).

Note: This README is a draft, do not rely on it.

Prerequisites

  • Linux kernel with eBPF support
  • Go 1.18+
  • Clang
  • XDP Tools

Installation & Usage

1. Clone

git clone https://github.com/yourusername/ebpf-drop-packets.git
cd ebpf-drop-packets

2. Running

go run main.go -iface eth0

Replace eth0 with your interface.

3. Compiling the flowz

clang -O2 -g -target bpf -I/usr/include/asm-generic -I/usr/include/asm -I/usr/include/bpf -c flowz.c -o flowz.o

4. Attaching flowz to an interface

sudo ip link set dev eth0 xdp obj flowz.o

About

simple bpf packet dropper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors