nftables – a more universal type of firewall system

Now, let's turn our attention to nftables, the new kid on the block. So, what does nftables bring to the table? (Yes, the pun was intended.):

  • You can forget about needing separate daemons and utilities for all of the different networking components. The functionality of iptables, ip6tables, ebtables, and arptables is now all combined in one neat package. The nft utility is now the only firewall utility that you'll need.
  • With nftables, you can create multi-dimensional trees to display your rulesets. This makes troubleshooting vastly easier because it's now easier to trace a packet all the way through all of the rules.
  • With iptables, you have the filter, NAT, mangle, and security tables installed by default, whether or not you use each one.
  • With nftables, you only create the tables that you intend to use, resulting in enhanced performance.
  • Unlike iptables, you can specify multiple actions in one rule, instead of having to create multiple rules for each action.
  • Unlike iptables, new rules get added atomically. (That's a fancy way of saying that there's no longer a need to reload the entire ruleset in order to just add one rule.)
  • nftables has its own built-in scripting engine, allowing you to write scripts that are more efficient and more human-readable.
  • If you already have lots of iptables scripts that you still need to use, you can install a set of utilities that will help you convert them into nftables format.

The only real downside to nftables is that it's still very much a work in progress. It will do most of what you can do with iptables, but the versions of nftables that come with Ubuntu versions 18.04 through 19.04 still lack some of the more advanced features that you might take for granted with the iptables-based solutions. Having said that, the latest version of nftables has somewhat fixed that problem, but at the time of writing, it's not in the current versions of Ubuntu. (That might change by the time you read this.) To see which version of nftables you have, use the following command:

sudo nft -v

If the version shows up as version 0.9.1 or later, then you have more features available to you than you had previously. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.65