News for hackers. Stuff that matters.
Re:Why you will love nftables by jlgaddis on Monday January 20, 2014 @02:35PM (#7091353)
I would really love to see "pf" on Linux.

When I began using Linux, "ipfwadm" had just been incorporated into the kernel. It was replaced in 2.2 by "ipchains" which was replaced in 2.4 by "iptables". Now we have "nftables".

I'll admit to not knowing much about nftables but from what I've read about it in the last few days, it's still not even close to what OpenBSD's "pf" is capable of.

Ahhh, well, I can wish, right?

Re:Why you will love nftables by zdw on Monday January 20, 2014 @03:46PM (#7091643)
Given that the kernel portion of nftables appears to just be a byte code interpreter, it probably would be possible to make something that takes pf syntax and puts out nftables byte code.

I think that would be pretty slick. As a long time pf user, I've always preferred it's syntax, and the nftables syntax looks like a step in the right direction at least, given the horror that was previous syntax methods.

Re:Why you will love nftables by simcop2387 on Monday January 20, 2014 @02:52PM (#7091433)
I've heard this about every linux firewall, can you give some good examples of what either iptables or nftables can't do that pf can?
Re:Why you will love nftables by elehack on Monday January 20, 2014 @02:54PM (#7091440)
I don't have good examples of what can or cannot be done.

But I find pf much easier to understand. I can write pf rules myself and understand, clearly, what my firewall is doing. I haven't found iptables near as approachable, and depend on firewall configuration tools to generate the rules and chains for me.

Re:Why you will love nftables by simcop2387 on Monday January 20, 2014 @02:58PM (#7091454)
I'd definitely agree that iptables is not nearly as approachable as i've seen pf be. I've yet to see something that can't be done with it if you take the time (this is discounting performance, i know that it can get a little hairy after a few hundred rules if not setup correctly).
Re:Why you will love nftables by xiljin on Monday January 20, 2014 @03:22PM (#7091541)
Many people use something like denyhosts or fail2ban to help with brute force attacks. PF has built-in support for building rules with options which will throw potential attackers into a 'penalty box' based on certain factors like connection rate.
Re:Why you will love nftables by hebz0rl on Monday January 20, 2014 @03:33PM (#7091586)
You can use iptables for that:

  $ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH

  $ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j DROP
Copied from http://kvz.io/blog/2007/07/28/block-brute-force-attacks-with... but I agree that pf ist just much more sane config wise.
Re:Why you will love nftables by simcop2387 on Monday January 20, 2014 @03:50PM (#7091661)
Since nftables is supposed to be backwards compatible, I'd guess it can do this too. I wonder what it'll look like for that. A lot of the other syntax looks nicer, i suspect that this will be better too.
Re:Why you will love nftables by simcop2387 on Monday January 20, 2014 @03:32PM (#7091582)
That one I haven't seen before, I wonder if the new nftables might be able to implement any of that. Based on the state machine specs probably not, since I don't think there's any storage or any way for it to generate new rules on itself based on what I've read.
Re:Why you will love nftables by marios on Tuesday January 21, 2014 @01:03AM (#7093736)
I've found PF easier to get started with and more manageable due to the config syntax. Now onto something that PF can do but iptables can't: address family translation. There is a module somewhere on github that does NAT64, but is somewhat limited compared to PF. Now if you want to go the other way around, i.e. NAT46, it is currently not possible on Linux in kernelland.
Re:Why you will love nftables by zobzu on Monday January 20, 2014 @04:29PM (#7091868)
its not about what can be done, its about the learning curve and conciseness of the rules. pf has nice user space tools and easy, powerful syntax.

netfilter's iptables syntax well.. over the last, what, 10 years? we all got used to it. seems like nftables is going to required another 5 to become more or less known among people...

Re:Why you will love nftables by purple_horse on Monday January 20, 2014 @10:19PM (#7093225)
Anchors?

Tables?

Or my very favourite: last match wins, which shortens your ruleset considerably.

Re:Why you will love nftables by simcop2387 on Wednesday January 22, 2014 @03:42PM (#7105244)
Anchors look suspiciously like creating a new chain in iptables. Tables there doesn't seem to be any direct analog, though can be done similarly by creating a chain that matches the list of addresses you're interested in and forwarding the rules there.

That said both of pf's versions look better than iptables. nftables looks like it does a better job of this like pf does, which is definitely a good thing.

Re:Why you will love nftables by Florin_Andrei on Monday January 20, 2014 @08:50PM (#7092901)
I've used all of the above. pf is much, much over-rated. iptables is just about as capable. Plus, in a speed test I did a while ago, a Linux firewall vastly outperformed an OpenBSD firewall on the same hardware, in terms of amounts of traffic it could handle before keeling over and dying.

OpenBSD is neat, but creating a cult around it doesn't help with anything.

Re:Why you will love nftables by networked on Monday January 20, 2014 @05:32PM (#7092147)
>I would really love to see "pf" on Linux.

Well, there's at least a Linux port of FreeBSD's ipfw and dummynet: http://info.iet.unipi.it/~luigi/dummynet/. I tried it briefly on my home server (Ubuntu 12.04 LTS with a stock 3.2.0 kernel) and it appeared to work as expected with rulesets written for FreeBSD.

Re:Why you will love nftables by Thaxll on Monday January 20, 2014 @08:49PM (#7092897)
I woudn't, pf is good and the learning curve is easier but Iptables is more advanced and powerful ( many modules that don't exist in pf )
Re:Why you will love nftables by lelf on Monday January 20, 2014 @02:41PM (#7091380)
Sorry, NIH. And we won't see dtrace either
Re:Why you will love nftables by strcat on Monday January 20, 2014 @03:11PM (#7091503)
DTrace and ZFS are both available for Linux as out-of-tree kernel modules. Sun intentionally used a GPL-incompatible license... it has nothing to do with NIH.
Re:Why you will love nftables by wmf on Monday January 20, 2014 @05:37PM (#7092165)
Even the Linux clones of DTrace are gratuitously incompatible when it probably would have been easier for users to clone DTrace exactly.