bpfilter icon indicating copy to clipboard operation
bpfilter copied to clipboard

Provide usage examples in README.md to confirm operation

Open kevinworth opened this issue 1 year ago • 7 comments

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.

kevinworth avatar Aug 15 '23 19:08 kevinworth

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! :)

qdeslandes avatar Aug 16 '23 06:08 qdeslandes

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 avatar Mar 04 '24 08:03 tengliu0929

@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?

qdeslandes avatar Mar 04 '24 10:03 qdeslandes

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

tengliu0929 avatar Mar 05 '24 05:03 tengliu0929

Build error, I tried on ubuntu22.04 and ubuntu23.04, but get the same error, does you not define the macro BPF_NETFILTER? Uploading BPFILTER.png…

tengliu0929 avatar Mar 06 '24 06:03 tengliu0929

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.

qdeslandes avatar Mar 06 '24 21:03 qdeslandes

ok, got it , try later, thank you for your reply.

tengliu0929 avatar Mar 07 '24 06:03 tengliu0929

bpfilter's documentation has been updated to detail usage, closing this issue.

qdeslandes avatar Aug 27 '24 08:08 qdeslandes