Basic idea was taken from the publication
A DDoS attack, which stands for “distributed denial-of-service” is a malicious attempt to disrupt the normal traffic of a targeted server, service or network by overwhelming the target or its surrounding infrastructure with a flood of Internet traffic.
These attempt to use up all the available connections to infrastructure devices such as load-balancers, firewalls and application servers. Even devices capable of maintaining state on millions of connections can be taken down by these attacks.
- Install a rust stable toolchain:
rustup install stable
- Install a rust nightly toolchain:
rustup install nightly
- Install bpf-linker:
cargo install bpf-linker
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
BPF_PATH=target/bpfel-unknown-none/release/ddos-protection-task cargo build --bin server
BPF_PATH=target/bpfel-unknown-none/release/ddos-protection-task RUST_LOG=info cargo xtask run
docker build -f ./docker/server/Dockerfile -t 'server:08022023' .
docker run --privileged --env RUST_LOG=debug --name rust-server --net host server:08022023
it's impossible to run the server using bpf without the flag issue
docker build -f ./docker/client/Dockerfile -t 'client:08022023' .
docker run --env RUST_LOG=debug --name rust-client --net host client:08022023