bpfilter
bpfilter copied to clipboard
Provide usage examples in README.md to confirm operation
The original kernel introduction of bpfilter includes a series of usage examples via iptables
ping
and bpftool
. A similar example set of commands (and perhaps expected log output from the bpfilter
daemon) would be a huge help in confirming things are hooked in properly after building/loading the binary.
This is a great idea! I'm currently working on BPF_NETFILTER
program type support for iptables
, which slightly will change bpfilter
's behaviour when used with iptables
. I'll be able to provide up-to-date usage examples after that! :)
Could you please list the python subversion this project used, I tried python3.12, but got some python libs had been deprecated for python3.12.
@tengliu0929 Could you provide more details about the error? The README lists the required packages for Fedora 38+, are you using a different distribution? Did you install the packages using pip
or your package manager?
But I use ubuntu21.04, does this make a difference? I suppose it is the version of python3.12 that does matters, not the pip version
Build error, I tried on ubuntu22.04 and ubuntu23.04, but get the same error, does you not define the macro BPF_NETFILTER?
That's the reason then: BPF_NETFILTER
has been added to Linux in version 6.4.
On Ubuntu, their are two ways to build and use bpfilter
:
- Use Ubuntu 23.10 or more recent (e.g. 24.04 when it comes out).
- Use Ubuntu 22.04 and enable the hadware enablement (HWE) stack.
Both solutions would provide Linux 6.5, which is recent enable to support BPF_NETFILTER
.
ok, got it , try later, thank you for your reply.
bpfilter
's documentation has been updated to detail usage, closing this issue.