<s>
nftables	B-Application
is	O
a	O
subsystem	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
providing	O
filtering	O
and	O
classification	O
of	O
network	O
packets/datagrams/frames	O
.	O
</s>
<s>
It	O
has	O
been	O
available	O
since	O
Linux	B-Operating_System
kernel	I-Operating_System
3.13	O
released	O
on	O
19	O
January	O
2014	O
.	O
</s>
<s>
nftables	B-Application
replaces	O
the	O
legacy	O
iptables	B-Application
portions	O
of	O
Netfilter	B-Application
.	O
</s>
<s>
Among	O
the	O
advantages	O
of	O
nftables	B-Application
over	O
iptables	B-Application
is	O
less	O
code	O
duplication	O
and	O
easier	O
extension	O
to	O
new	O
protocols	O
.	O
</s>
<s>
nftables	B-Application
is	O
configured	O
via	O
the	O
user-space	B-Operating_System
utility	O
nft	O
,	O
while	O
legacy	O
tools	O
are	O
configured	O
via	O
the	O
utilities	O
iptables	B-Application
,	O
ip6tables	B-Application
,	O
arptables	B-Protocol
and	O
ebtables	O
frameworks	O
.	O
</s>
<s>
nftables	B-Application
utilizes	O
the	O
building	O
blocks	O
of	O
the	O
Netfilter	B-Application
infrastructure	O
,	O
such	O
as	O
the	O
existing	O
hooks	O
into	O
the	O
networking	O
stack	O
,	O
connection	O
tracking	O
system	O
,	O
userspace	B-Operating_System
queueing	O
component	O
,	O
and	O
logging	O
subsystem	O
.	O
</s>
<s>
A	O
command	O
to	O
drop	O
any	O
packets	B-Protocol
with	O
destination	O
IP	O
address	O
1.2.3.4	O
:	O
</s>
<s>
Note	O
that	O
the	O
new	O
syntax	O
differs	O
significantly	O
from	O
that	O
of	O
iptables	B-Application
,	O
in	O
which	O
the	O
same	O
rule	O
would	O
be	O
written	O
:	O
</s>
<s>
nftables	B-Application
incorporates	O
such	O
as	O
dictionaries	O
,	O
maps	O
and	O
concatenations	O
that	O
do	O
not	O
exist	O
with	O
iptables	B-Application
.	O
</s>
<s>
Making	O
use	O
of	O
these	O
can	O
significantly	O
reduce	O
the	O
number	O
of	O
chains	O
and	O
rules	O
needed	O
to	O
express	O
a	O
given	O
packet	B-Application
filtering	I-Application
design	O
.	O
</s>
<s>
The	O
iptables-translate	O
tool	O
can	O
be	O
used	O
to	O
translate	O
many	O
existing	O
iptables	B-Application
rules	O
to	O
equivalent	O
nftables	B-Application
rules	O
.	O
</s>
<s>
Debian	O
10	O
(	O
Buster	O
)	O
,	O
among	O
other	O
Linux	B-Operating_System
distributions	O
,	O
uses	O
nftables	B-Application
along	O
with	O
iptables-translate	O
as	O
the	O
default	O
packet	B-Application
filtering	I-Application
backend	O
.	O
</s>
<s>
The	O
project	O
was	O
first	O
publicly	O
presented	O
at	O
Netfilter	B-Application
Workshop	O
2008	O
by	O
Patrick	O
McHardy	O
from	O
the	O
Netfilter	B-Application
Core	O
Team	O
.	O
</s>
<s>
The	O
first	O
preview	O
release	O
of	O
kernel	B-Operating_System
and	O
userspace	B-Operating_System
implementation	O
was	O
given	O
in	O
March	O
2009	O
.	O
</s>
<s>
Although	O
the	O
tool	O
has	O
been	O
called	O
"	O
the	O
biggest	O
change	O
to	O
Linux	B-Operating_System
firewalling	O
since	O
the	O
introduction	O
of	O
iptables	B-Application
in	O
2001	O
"	O
,	O
it	O
has	O
received	O
little	O
press	O
attention	O
.	O
</s>
<s>
Notable	O
hacker	O
Fyodor	O
Vaskovich	O
(	O
Gordon	O
Lyon	O
)	O
said	O
that	O
he	O
is	O
"	O
looking	O
forward	O
to	O
its	O
general	O
release	O
in	O
the	O
mainstream	O
Linux	B-Operating_System
kernel	I-Operating_System
"	O
.	O
</s>
<s>
In	O
October	O
2012	O
,	O
Pablo	O
Neira	O
Ayuso	O
proposed	O
a	O
compatibility	O
layer	O
for	O
iptables	B-Application
and	O
announced	O
a	O
possible	O
inclusion	O
of	O
the	O
project	O
into	O
mainstream	O
kernel	B-Operating_System
.	O
</s>
<s>
On	O
16	O
October	O
2013	O
,	O
Pablo	O
Neira	O
Ayuso	O
submitted	O
a	O
nftables	B-Application
core	O
pull	O
request	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
tree	O
.	O
</s>
<s>
It	O
was	O
merged	O
into	O
the	O
kernel	B-Operating_System
mainline	O
on	O
19	O
January	O
2014	O
,	O
with	O
the	O
release	O
of	O
Linux	B-Operating_System
kernel	I-Operating_System
version	O
3.13	O
.	O
</s>
<s>
The	O
nftables	B-Application
kernel	B-Operating_System
engine	O
adds	O
a	O
simple	O
virtual	B-Architecture
machine	I-Architecture
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
which	O
is	O
able	O
to	O
execute	O
bytecode	O
to	O
inspect	O
a	O
network	B-Protocol
packet	I-Protocol
and	O
make	O
decisions	O
on	O
how	O
that	O
packet	B-Protocol
should	O
be	O
handled	O
.	O
</s>
<s>
The	O
operations	O
implemented	O
by	O
this	O
virtual	B-Architecture
machine	I-Architecture
are	O
intentionally	O
made	O
basic	O
.	O
</s>
<s>
It	O
can	O
get	O
data	O
from	O
the	O
packet	B-Protocol
itself	O
,	O
have	O
a	O
look	O
at	O
the	O
associated	O
metadata	O
(	O
inbound	O
interface	O
,	O
for	O
example	O
)	O
,	O
and	O
manage	O
connection-tracking	O
data	O
.	O
</s>
<s>
The	O
virtual	B-Architecture
machine	I-Architecture
is	O
also	O
capable	O
of	O
manipulating	O
sets	O
of	O
data	O
(	O
typically	O
,	O
IP	O
addresses	O
)	O
,	O
allowing	O
multiple	O
comparison	O
operations	O
to	O
be	O
replaced	O
with	O
a	O
single	O
set	O
lookup	O
.	O
</s>
<s>
The	O
above-described	O
organization	O
is	O
contrary	O
to	O
the	O
iptables	B-Application
firewalling	O
code	O
,	O
which	O
has	O
protocol	O
awareness	O
built-in	O
so	O
deeply	O
into	O
the	O
logic	O
that	O
the	O
code	O
has	O
had	O
to	O
be	O
replicated	O
four	O
timesfor	O
IPv4	B-Protocol
,	O
IPv6	B-Protocol
,	O
ARP	O
,	O
and	O
Ethernet	O
bridgingas	O
the	O
firewall	B-Application
engines	O
are	O
too	O
protocol-specific	O
to	O
be	O
used	O
in	O
a	O
generic	O
manner	O
.	O
</s>
<s>
The	O
main	O
advantages	O
of	O
nftables	B-Application
over	O
iptables	B-Application
are	O
the	O
simplification	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
ABI	B-Operating_System
,	O
reduction	O
of	O
code	O
duplication	O
,	O
improved	O
error	B-Error_Name
reporting	I-Error_Name
,	O
and	O
more	O
efficient	O
execution	O
,	O
storage	O
and	O
incremental	O
changes	O
of	O
filtering	O
rules	O
.	O
</s>
<s>
Traditionally	O
used	O
,	O
,	O
and	O
(	O
for	O
IPv4	B-Protocol
,	O
IPv6	B-Protocol
,	O
ARP	O
and	O
Ethernet	O
bridging	B-Protocol
,	O
respectively	O
)	O
are	O
intended	O
to	O
be	O
replaced	O
with	O
as	O
a	O
single	O
unified	O
implementation	O
,	O
providing	O
firewall	B-Application
configuration	O
on	O
top	O
of	O
the	O
in-kernel	O
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
nftables	B-Application
also	O
offers	O
an	O
improved	O
userspace	B-Operating_System
API	O
that	O
allows	O
atomic	B-General_Concept
replacements	O
of	O
one	O
or	O
more	O
firewall	B-Application
rules	O
within	O
a	O
single	O
Netlink	B-Application
transaction	O
.	O
</s>
<s>
This	O
speeds	O
up	O
firewall	B-Application
configuration	O
changes	O
for	O
setups	O
having	O
large	O
rulesets	O
;	O
it	O
can	O
also	O
help	O
in	O
avoiding	O
race	O
conditions	O
while	O
the	O
rule	O
changes	O
are	O
being	O
executed	O
.	O
</s>
<s>
nftables	B-Application
also	O
includes	O
compatibility	O
features	O
to	O
ease	O
transition	O
from	O
previous	O
firewalls	B-Application
,	O
command-line	O
utilities	O
to	O
convert	O
rules	O
in	O
the	O
iptables	B-Application
format	O
,	O
and	O
syntax-compatible	O
versions	O
of	O
iptables	B-Application
commands	O
that	O
use	O
the	O
nftables	B-Application
backend	O
.	O
</s>
