Contains custom iptables extensions (matches/targets) used in DNOS.
sudo apt install iptables-dev
- Make sure the machine you're compiling at is running the same kernel and iptables version as what DNOS is running (5.4.0-73-generic and 1.8.4 respectively, as of the time of this writing).
- Build all extensions:
make all
- Clean all extensions:
make clean
These iterate and build/clean all the extensions under the extensions/
directory.
The output of each extension is:
- A
.ko
file - The kernel module responsible for the heavy lifting of the extension (registers to netfilter, processes skbs etc). - A
.so
file - A userspace plugin for theiptables
program. Mostly responsible for argument parsing.
- extensions/
- Contains all the extensions, each in its own directory.
- out/
- The build process will place here the .so and .ko files, each in the matching extensions' directory.
- help/
- Contains helpful tutorials.
- Copy the .so files into
/usr/lib/x86_64-linux-gnu/xtables
insmod
the .ko files