ipt-netflow icon indicating copy to clipboard operation
ipt-netflow copied to clipboard

NFT support

Open willyhun opened this issue 10 years ago • 13 comments

Do you plan support nftables infrastructure? Thanks!

willyhun avatar Oct 27 '15 22:10 willyhun

As far as I know, nftables is not extensible.

aabc avatar Oct 27 '15 22:10 aabc

Well, if you (or someone else) find a way (or example how) to extend nftables, please send!

aabc avatar Oct 29 '15 17:10 aabc

Maybe this can help? https://zasdfgbnm.github.io/2017/09/07/Extending-nftables/

q2dg avatar Feb 24 '19 21:02 q2dg

@q2dg Thanks. That's interesting. But he still patch libnftnl and nftables userspace to support new statement.

aabc avatar Feb 28 '19 19:02 aabc

Made fork and added support for nftables https://github.com/junjunk/ipt-netflow/tree/nftables This is the first testing commit - no checks in configure Userspace patches will be a bit later

junjunk avatar Mar 26 '19 17:03 junjunk

@junjunk Thanks for working on it. It seems break compatibility with iptables too?

aabc avatar Mar 27 '19 10:03 aabc

Well, I tried to leave compatibility with iptables untouched. Init function of module tries to register 2 different subsys - first with xt_register_targets(ipt_netflow_reg, ARRAY_SIZE(ipt_netflow_reg)) as it was, and second one with nft_register_expr(&nft_netflow_type) Also, I've made single main function netflow_target with 2 wrappers ipt_netflow_target for iptables and nft_netflow_eval for nftables

junjunk avatar Mar 27 '19 10:03 junjunk

Also, it seems to me that better way to register iptables/nftables targets via module params

junjunk avatar Mar 27 '19 10:03 junjunk

Ah, that sounds good. (I was misinterpreted the patch, probably.)

aabc avatar Mar 28 '19 06:03 aabc

what plans to add support of NFT?

stalker37 avatar May 17 '19 14:05 stalker37

@stalker37 There is no way to make netflow target as a separate installable module for nft. nftables source code patching is needed. But they will (probably) not integrate it into nftables because it is not in the kernel upstream. So, nftables is less flexible in the sense of extensibility than iptables.

aabc avatar May 17 '19 14:05 aabc

Maybe a separate kernel module without binding to iptables/nftables?

stalker37 avatar Aug 10 '19 16:08 stalker37

What do you mean in relation to nft[ables] support?

aabc avatar Aug 16 '19 15:08 aabc