I believe an early consideration for this project should be which filtering (Firewall) mechanism will be chosen for this Linux Based Router.
Traditionally, iptables has been the default, with nftables slated to be an official replacement, but there is also eBP and bpfilter
Personally, I believe the approach of eBPF might be appealing to this project, as it will also extend into other areas of functionality which does not include network packet filtering.
Here's my attempt at outlining some of the differences.
iptables
Oldest of the three, introduced in Linux kernel 2.4 (around 2001).
User-space utility for configuring the Linux kernel firewall.
Uses chains and tables to process network packets.
Widely used and well-established, but can be complex for large rulesets.
Performance can degrade with many rules.
nftables
Successor to iptables, introduced in Linux kernel 3.13 (2014).
Aims to replace iptables, ip6tables, arptables, and ebtables.
More efficient packet classification framework than iptables.
Uses a single rule engine for all protocols, simplifying configuration.
Better performance with large rulesets and more flexible rule definition.
More modern and readable syntax compared to iptables.
bpfilter
Newest of the three, still in development as of 2024.
Designed to eventually replace both iptables and nftables.
Uses eBPF (Extended Berkeley Packet Filter) technology under the hood.
Aims to provide better performance and more flexibility than both iptables and nftables.
Designed to be backwards compatible with iptables and nftables configurations.
Still in experimental stages and not yet widely adopted or fully implemented.
Key differences:
Age and Adoption: iptables is oldest and most widely used. nftables is newer and gaining adoption. bpfilter is the newest and still experimental.
Performance: bpfilter aims to offer the best performance, followed by nftables, then iptables.
Flexibility: bpfilter, leveraging eBPF, should offer the most flexibility, followed by nftables, then iptables.
Ease of use: iptables is familiar but can be complex. nftables aims to simplify configuration. bpfilter aims to be backwards compatible while offering new capabilities.
Implementation: iptables and nftables are primarily userspace tools configuring kernel features. bpfilter uses eBPF programs running in the kernel.
Maturity: iptables is most mature, nftables is well-established, while bpfilter is still experimental.
Future direction: bpfilter is intended to eventually replace both iptables and nftables, providing a unified framework for packet filtering in Linux.
I believe an early consideration for this project should be which filtering (Firewall) mechanism will be chosen for this Linux Based Router. Traditionally,
iptables
has been the default, withnftables
slated to be an official replacement, but there is also eBP andbpfilter
Personally, I believe the approach of eBPF might be appealing to this project, as it will also extend into other areas of functionality which does not include network packet filtering.
Here's my attempt at outlining some of the differences.
iptables
nftables
bpfilter
Key differences: