Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nftables support #1675

Open
stintel opened this issue Dec 21, 2022 · 6 comments
Open

nftables support #1675

stintel opened this issue Dec 21, 2022 · 6 comments
Assignees

Comments

@stintel
Copy link

stintel commented Dec 21, 2022

The world is moving away from iptables/ipset to nftables. The latter comes with its own generic set infrastructure. While there are some options that support a hybrid setup (nftables backend with iptables commands), it's probably cleaner to use nftables directly. It's probably also a good time to consider using libmnl or libnftnl or so to talk to the kernel directly rather than calling binaries from C++ code.

Some proof of the claim:
https://firewalld.org/2018/07/nftables-backend
https://git.openwrt.org/08d9f6e3020b4a149b2007b6ed7d684c49af9bbf
https://wiki.debian.org/nftables

@wgtdkp
Copy link
Member

wgtdkp commented Dec 21, 2022

I suppose we can talk to kernel directly with nfnetlink messages?

@stintel
Copy link
Author

stintel commented Dec 21, 2022

I suppose we can talk to kernel directly with nfnetlink messages?

Probably better to not use libnfnetlink, see https://www.spinics.net/lists/netfilter/msg59210.html Sorry, you didn't mention libnfnetlink, never mind me.

@wgtdkp
Copy link
Member

wgtdkp commented Dec 21, 2022

Yeah, I was thinking about reading/writing raw netlink messages given we are already doing so. But libmnl or libnftnl are good candidates if they are generally available on different platforms that we support.

@spacekitteh
Copy link

Any movement on this? All of my infrastructure uses nftables, and I would like to keep it that way.

@bukepo
Copy link
Member

bukepo commented Jan 6, 2025

Any movement on this? All of my infrastructure uses nftables, and I would like to keep it that way.

would you like to submit a PR for this?

@spacekitteh
Copy link

Any movement on this? All of my infrastructure uses nftables, and I would like to keep it that way.

would you like to submit a PR for this?

I wouldn't know how to implement it, unfortunately; the lowest-level language I'm fluent with is Haskell ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants