NFTables To Replace iptables In the Linux Kernel
An anonymous reader writes "NFTables is queued up for merging into the Linux 3.13 kernel. NFTables is a four-year-old project by the creators of Netfilter to write a new packet filtering / firewall engine for the Linux kernel to deprecate iptables (though it now offers an iptables compatibility layer too). NFTables promises to be more powerful, simpler, reduce code complication, improve error reporting, and provide more efficient handling of packet filter rules. The code was merged into net-next for the Linux 3.13 kernel. Iptables will still be present until NFTables is finished, but it is possible to try it out now. LWN also has a writeup on NFTables."
ipfwadm.. ipchains.. iptables.. nftables... progress sucks. :(
IPChains work just fine thank you very much!
Kernel 2.4 works fine for my needs. You kids today have no idea what it is like upgrading thousands of computers at work! Especially when you have to justify to a beancounter to upgrade an IP table that has worked fine since October 2001 and already works. It is an enterprise standard that works so why fix what isn't broken?
Last thing I need is another confusing IP table interface designed for teenagers.
With a modern AV I should be just fine if I do not go to questionable websites.
http://saveie6.com/
All my precious iptables knowledge gone!
Linus hates us precious! Hates us!
Mod me down, my New Earth Global Warmingist friends!
Can't we have OpenBSD pf instead? Powerful, nice, decent documentation on how to use it, syntax that makes a lot more sense than iptables.
Oolite: Elite-like game. For Mac, Linux and Windows
The main advantage of this is moving protocol knowledge out of the kernel into userspace.
Which means that the kernel doesn't need a million modules that understand the various bits of various protocols. If something new comes up, the userspace compiler can patched to deal with it.
It should also make the kernel part much smaller and easier to make secure.
I can't get to slashdot. Let's troubleshoot!
[root@wang]# ifconfig
bash: ifconfig: command not found
[root@wang]# iptables -F
bash: iptables: command not found
We couldn't find any way around that.
For good reason. That's just reflecting the fact that a program has to check a series of instructions. The code can't check multiple conditions at the same time. Branching out into a series of tables for different things is the best way to reduce the unnecessary checks by filtering out those that do/don't apply. My first rule is always to allow RELATED/ESTABLISHED packets, so only the first packet of any new connection goes any further.
openwrt puts that related/established rule first and it sucks. If I want an internet curfew I want it to take effect immediately, not when the current connection is finished. Same for an IP address that trips up the malware triggers. It has to stop and it has to stop now, not when the payload has finished downloading.
Hi there. This is how OpenBSD's PF has always worked. Linux needs to catch up to the times.
I had moved to linux from bsd and always was unhappy with iptables. and now there will be something close to pf
Then use -I to 'insert' a rule above the ESTABLISHED,RELATED line.
Every firewall GUI for Linux is underdeveloped or abandoned and lacks complete control over all functions.
Different use cases need different features. The abandoned guis were made by people who didn't understand this when they began their projects. The development taught them that lesson.
No one should be forced to manually configure this, it should be point and click similar to free firewalls for Windows (excluding discussion on app based blocking in Win).
one-click solutions to complex problems are always bad. That said, simplistic solutions are simple to configure with iptables the way it is.
I hope someone develops a GUI for "NFTables", because manually configuring iptables (using ufw, or its lack of complete control/fine tuning gui or some other method) sucks. Some assume you know all about Linux networking.
Well, if you're designing a complex solution for a complex networking problem, you will need to know a bit more about the guts of a system regardless the platform. A gui flexible enough to represent every possible useful iptables configuration would be about as unintuitive as the command line util.
There should be a GUI for configuring Sysctl, too, with good documentation and tool tips.
the documentation for sysctl is in /usr/src/linux/Documentation/sysctl. Hardware specific ctls are in the documentation for the hardware's specific driver.
I've done that to Very Important Client.
Now I explicitly have a drop everything rule, with default accept. That way -F doesn't bite me.
I've been using linux since 2000. Two comments...
1) IPCHAINS was nice, simple, and usable. IPTABLES has stuff scattered all over the place. This may affect me more as a Gentoo user who configures his own kernel. I have to remember to...
a) enable Netfilter
b) enable "Advanced netfilter configuration" so that I can specify multi-port matches
c) check off the necessary items in "Core Netfilter Configuration"
d) check off the necessary items in "IP: Netfilter Configuration"
That's on a simple home system that doesn't attempt NAT/Masq/Routing/etc.
2) A problem with putting detailed specifications into the kernel is that when I want to enable new features (not just new rules), I have to tweak the kernel, rebuild it, and reboot. If we had to do this with new MTAs or crons or other system programs, there would be a huge outcry. Moving this out of the kernel looks logical.
I'm not repeating myself
I'm an X window user; I'm an ex-Windows user
Don't worry, iptables and arptables aren't going to magically disappear. A ridiculous amount of infrastructure depends on both, and the nftables announcement is severely over-hyped. Having alternatives is a good thing, and it doesn't mean the sky is falling.
Write failed: Broken pipe
The tendency to try to abstract activities that are essentially programs into a set of non-program-like objects has generally led to accumulation of byzantine cruft. This is especially true in the network packet processing and authentication domains. This isn't just a problem with GUIs. CLI utilities often want to just present the user with "objects" like rules and lists, and try to conceal flow control concepts by nesting contextually meaningful layers of these objects -- the meaning sof these layers often being ambiguously defined. Complex tasks crowbarred into that paradigm tend to explode geometrically into an unmanageable mess.
What's needed, across all domains, to enable those more GUI-oriented people to work with such concepts is a good GUI for program logic, and it needs to be built by very patient programmers listening intently to the needs of GUI-oriented users of average intelligence.
Someone had to do it.
". . . to deprecate iptables . . ."? I do not think "deprecate" means what you think it means.
Is NFTables suitable as a generic packet classifier, or is it strictly limited to packet filtering? Van Jacobson's net channels offer the possibility of extraordinary improvements in efficiency and performance, great simplification of drivers, ease of development, and much improved flexibility. The one missing piece is a flexible packet classifier. While NFTables looks like it incorporates many of the essential ideas, it isn't clear wether it is built with this in mind. If not, I'd like to see this fixed before it is integrated.
I've long thought that that we should replace the whole mess of statically #ifdef'd protocol switch statements and filtering mechanisms tacked on as an afterthought. That instead, we should build all of that upon something like BPF at the very lowest level, and have it dynamically compiled to native code. Protocol classification and filtering rules would be translated to BPF like code fragments to be assembled by the system, and it would be high performance and truly modular. Periodically analyzing the statistics of actual protocol and traffic flows, the system could also recombine the fragments in the most efficient way possible.
You are still free to do that. You could even write a userspace program to build a tree from a set of rules if you like.
JUST MAKE a DECENT FUCKING GUI with DOCUMENTATION.
I don't think fucking needs a new GUI. The current touch-based interface works just fine. Most people don't need any documentation for it, but if you really need it, I think there's a lot of third-party stuff explaining every fucking detail. There are even videos demonstrating its use, look under "porn".
The Tao of math: The numbers you can count are not the real numbers.
What about taking the list of rules and automatically compiling it into a decision tree?
The Tao of math: The numbers you can count are not the real numbers.
I know the feeling.
That feeling means that it's time to retire from IT, and move to a less trend-driven industry. Such as, uh, fashion.
What I find is that when you encounter a series of iptable statements, it seems obvious that the kernel is building some sort of table of data or rules (LISP: data == program).
But instead of providing the table to the system, you have to build it up, piece by excruciating piece.
Whoever thought that was a good idea should have his packets limited.
I'm not a lawyer, but I play one on the Internet. Blog
Can we unfuck PulseAudio before we go replacing something else that ain't broke? What's it been, ten years? and that PA shit still don't work...
somebody decides they have a better way, and rather than keeping the two available until one stops being maintained they go and dump one as 'inferior'
To be fair, the kernel developers have (to my knowledge) never done this. If you have ever compiled a kernel yourself, you will have seen that new features are flagged as "experimental", older features as "deprecated", and defaults are applied judiciously.
You will most likely find that it is your distribution that is most guilty of foisting bleeding-edge, half-tested stuff on to its users. Linus and the kernel devs are (and have to be) almost fanatically conservative.
Please, I do not want to change everything again.
Then don't. NFTables is (as I see it) simply another (supposedly/perhaps) more elegant way of approaching the issue. I don't believe there is anything that makes it technically superior to iptables, and in any case, there is nothing that says you have to use NFTables. If your distro won't work properly without it, it's time to change your distro to a more sensible one.
I have tried several GUIs for iptables, and also a few firewall scripts for both a few servers and my notebook. In the end, I have always been frustrated.
Finally, for my rather simple needs, I have a simple (~ 100-150 lines) file in "iptables-save" format, and a short custom init script which basically does iptables-restore from that file or saves to it.
I am not convinced that a GUI would be clearer / more readable / more flexible than that. At least, the ones I tried were not.
One interesting feature in NFTables for me is that it seems to support predefined variables. As I understand it, I could use a very similar approach, just have the added benefit of being able to declare stuff like "LAN=192.168.xx.0/24", "Mail=xxx.xxx.xxx.xxx" etc. and use variables in the actual rules. That would be a nice improvement, even if I have to learn a new rule syntax, which doesn't seem too obscure from what I could see.
Yeah I guess a "quick howto" isn't quite going to cut it. I wonder if Linus would ever put his foot down and say "no docs = no patch accept".
That's actually OpenBSD's official policy.
Snapgear had a pretty good GUI for iptables with an option for command line rules if you needed them.
Of course once you start doing something repetitive it's hard to beat a script with a loop or even cut and paste instead of ticking hundreds of boxes.
"Too many people had figured out how to configure a host firewall, so we had to change it all around again."
After finally getting ipTables syntax firmly implanted in my brain they are go to fucking make something new, that does the same thing?
The "quick documentation" is only how to download and build it. The very few examples are horribly described and laid out. Assign a chain to a verdict , uhhh hows that again?
Hey KID! Yeah you, get the fuck off my lawn!
Instead, it un-secures their network.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
If you don't know what you're trying to do with your firewall, a GUI will not help you.
However, a sensible default "common case" example configuration will.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
pf has supported variables since uh.... it was invented.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
Try FreeBSD or PC-BSD.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
The "writeup on NFTables" linked in the submission is very outdated. LWN's article from two months ago is a lot more useful. See also this this brief news item (“not ready to replace iptables yet”) and the nftables web page.
Yes , it drops the firewall for that machine, which is the expected result. Is it a good idea to drop the firewall? Your sysadmin is supposed to know that before messing with the firewall. This is Linux, not Fisher-Price.
I was going to ask - does NFTables have a simpler/better way of doing packet filtering for IPv6? That would be the main, if not only reason for switching.
By 'IPv6 NAT', do they mean NAT-PT? It's somewhat different in that it has a 1:1 relationship b/w a link-local address and the global unicast address. Here, the only reason for having it is multihoming load balancing, not for security or topology hiding. Incidentally, how would topology be discovered simply by knowing all IP addresses within a link?