Skip to content

giangndm/firewall-xdp-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software Defined Firewall with Rust and eBpf-XDP

Prerequisites

  1. Install bpf-linker: cargo install bpf-linker

Build eBPF

cargo xtask build-ebpf

To perform a release build you can use the --release flag. You may also change the target architecture with the --target flag.

Build Userspace

cargo build

Run

RUST_LOG=info cargo xtask run

Architecture

Userspace application will manage blacklist and whitelist ip in a map: BLACKLIST and WHITELIST. eBpf program will using that map for checking BLACKLIST or WHITELIST

The list can be updated by some ways

  • API and token
  • Config file and dynamic reload by send POST to api/reload_config

BLACKLIST map

Map between ip address and port range

WHITELIST map

Map between ip address and port range

About

Software Defined Firewall with XDP and Rust

Resources

Stars

Watchers

Forks

Packages