A Brief History of Linux Networking
8,555 Total views across this article’s versions; includes the historical baseline where available.
Have you ever wondered why Linux network management is so confusing? You need only make a cursory review of the history of Linux networking tools to understand how it got this way.
It's not surprising so many people become confused attempting to comprehend Linux network routing functions, given the manner in which they have evolved. The names of several important commands and processes are nearly identical to others belonging to completely different tool generations.
Legacy interfaces can remain familiar while their implementation changes. A command name alone does not establish which kernel interface it uses, and the continuity of names does not mean Linux networking code remained unchanged for twenty years.
The Netfilter project's historical account distinguishes these generations:
| Period or kernel generation | Packet-filtering development |
|---|---|
| Late 1994; Linux 1.1 series | Alan Cox ported a BSD-derived packet filter. Linux filtering predates ipfwadm. |
| Linux 2.0 generation | Jos Vos and others enhanced the filtering system; ipfwadm administered its rules. |
| Work in mid-1998 for Linux 2.2 | Rusty Russell and Michael Neuling reworked filtering and introduced ipchains. |
| Work in mid-1999 for Linux 2.4 | Another rewrite introduced the Netfilter framework and iptables. |
| Linux 3.13, January 2014 | nftables entered the mainline kernel, with the nft userspace command. |
These are development milestones, not interchangeable dates for userspace releases and stable kernel releases. Routing tools followed a related but separate development path.
Early Linux Firewall Administration
ipfwadm was an early userspace interface for Linux packet-filtering rules. It was followed by ipchains, then iptables. Calling ipfwadm the first Linux packet filter overlooks the earlier kernel implementation.
nftables later provided a common framework for tasks previously divided among iptables, ip6tables, arptables, and ebtables. It continues to use Netfilter facilities, including connection tracking and NAT; it does not replace every related tool with a single command.
The names refer to different layers:
- A chain is an ordered list of rules.
- ipchains is a historical firewall administration tool and associated filtering implementation.
- Netfilter is a kernel framework for packet handling.
- nf_tables is the kernel subsystem used by nftables.
- nftables is the packet-classification framework and associated tools; nft is its command-line utility.
Chains and ipchains
A chain is not the same thing as the old ipchains command. Both ipchains and iptables use chains, but their packet paths differ.
The old ipchains built-in names were lowercase: input, output, and forward. Its input and output chains saw incoming and outgoing traffic respectively, including forwarded traffic. With iptables, INPUT handles local delivery, OUTPUT handles locally generated traffic, and FORWARD handles transit traffic. This is a behavioral change, not merely a capitalization change. See the original migration notes.
Netfilter hook names such as PREROUTING and POSTROUTING describe positions in packet processing. A built-in chain is registered at a hook; it is not the hook itself. The process-flow article explains the distinction.
The RPDB Revolution
Policy routing adds an ordered set of rules that can select among routing tables using information such as source address or packet mark. That set of rules is the Routing Policy Database (RPDB). It is not a master table that contains every route or a firewall rule collection.
ip route and ip rule are commands in the iproute2 suite, originally developed by Alexey Kuznetsov. They manage routes and routing policy. The older route, ifconfig, and netstat commands belong to net-tools, not an earlier version of a package called iproute.
Policy routing and packet filtering have complementary roles. The existence of overlapping selectors does not make the RPDB a replacement for connection tracking, NAT, or a firewall. See ip-rule(8) and ip-route(8).
netfilter
There is no single netfilter command. Netfilter supplies hooks within the kernel, with components for tasks such as filtering, connection tracking, and NAT. Userspace programs configure the relevant kernel facilities.
It is not a two-part command translator that nftables can bypass while remaining independent of Netfilter. Both the traditional iptables infrastructure and nf_tables participate in the Netfilter framework.
iptables
iptables configures IPv4 packet-filtering and related rules. Tables contain chains; chains contain ordered rules. Available built-in chains differ among tables. Rules can filter, mark, or translate packets, subject to the table, hook, and target involved.
Routing decisions still belong to the routing subsystem. Firewall rules can influence later routing, for example by changing a destination or setting a packet mark that an RPDB rule matches. This is different from storing a route in an iptables chain.
The name iptables also does not uniquely identify its backend. The xtables-nft compatibility tools accept iptables syntax while configuring nf_tables. iptables --version reports whether that command uses the nftables backend. Inspect the installed system before interpreting an old example.
nftables
nftables became available in Linux 3.13 in January 2014. Its nft command configures rules in the kernel’s nf_tables subsystem. Packet evaluation takes place in the kernel; the expression engine is not a separate virtual machine that finishes handling packets before handing them to Linux.
Unlike the fixed set of built-in iptables chains, native nftables lets the administrator create base chains and choose their supported hooks and priorities. Regular chains can be reached from other chains. Tables still contain chains; base chains do exist, but are created explicitly.
| Userspace interface | Kernel facility |
|---|---|
| iptables-legacy | Traditional x_tables/iptables infrastructure within Netfilter |
| iptables-nft and related compatibility commands | nf_tables through the nftables API |
| nft | nf_tables within Netfilter |
The framework supports sets, maps, concatenations, and combined IPv4/IPv6 inet rulesets. Generic packet-field expressions can reduce the need for protocol-specific kernel extensions, but some features still require suitable kernel support. Check the versions and supported expressions before migrating a ruleset.
The Netfilter project recommends nftables for new rulesets. Distribution defaults and application support vary; claims about a universal “de-facto” tool, popularity, or the imminent disappearance of iptables need a date and evidence. The project’s technical overview explains the design without requiring those predictions.
UFW
UFW (Uncomplicated Firewall) provides a higher-level interface to firewall configuration. Ubuntu documents it as the default firewall configuration tool and also states that it is initially disabled. Those statements describe different things: the supplied administration tool and whether its policy has been enabled.
UFW’s role as a frontend does not make it another independent packet-filtering layer. See Ubuntu's firewall documentation for its scope and commands.
IPv4 and IPv6
iptables manages IPv4 rules; ip6tables manages IPv6 rules. Native nftables can handle both in the inet family. Netfilter supports both protocol families, while routing remains a separate kernel function.
IPv6 traffic is not protected merely because an IPv4 firewall has been configured. Review IPv6 addresses, routes, and firewall policy explicitly. The detailed examples in this article series are IPv4 examples unless stated otherwise.
Endnotes
ip6tablesis the IPv6 counterpart to iptables.arptablesmanages filtering of Address Resolution Protocol traffic.ebtablesmanages Ethernet bridge filtering.
Technical references: Netfilter history, ipchains-to-iptables differences, iptables manual, nftables project, and nftables manual.