xtables-multi
Manage multiple iptables-related tools with single binary
SYNOPSIS
command-name [options] [arguments]
Note: command-name is a symbolic link pointing to xtables-multi (e.g., iptables, ip6tables, arptables, ebtables, iptables-restore, etc.).
PARAMETERS
-h, --help
Displays the help message for the specific Netfilter tool being emulated (e.g., iptables, ip6tables). The content of the help message is determined by the command invoked via the symbolic link.
-V, --version
Displays version information for the xtables-multi binary and the Netfilter libraries it is built against. This provides details about the overall xtables suite version.
DESCRIPTION
xtables-multi is a versatile, single executable designed to consolidate the functionality of multiple Linux Netfilter packet filtering and NAT administration utilities. Rather than having separate binaries for commands like iptables, ip6tables, arptables, ebtables, and their corresponding -restore and -save counterparts, xtables-multi serves as a multi-call binary.
When invoked, it determines which specific Netfilter utility to emulate by inspecting the name it was called with (argv[0]). This is typically achieved by creating symbolic links from the desired command names (e.g., /usr/sbin/iptables) to the xtables-multi binary itself. This approach significantly reduces disk space usage, simplifies software distribution, and streamlines system administration by centralizing the binaries for these related tools. The behavior and command-line arguments are identical to those of the individual tools it impersonates.
CAVEATS
The functionality of xtables-multi is entirely dependent on the name it is invoked as. If symbolic links are not correctly established, or if the binary is invoked directly without a symlink, its behavior might be unpredictable or it might display an error indicating it doesn't know what command to impersonate. Users must refer to the specific man pages of iptables, ip6tables, etc., for detailed command-line options and usage, as xtables-multi itself only acts as a dispatcher.
USAGE VIA SYMBOLIC LINKS
The primary method of using xtables-multi is through symbolic links. System administrators typically create links such as /usr/sbin/iptables -> /usr/sbin/xtables-multi. When iptables is executed, the kernel resolves the symlink, and xtables-multi is invoked. It then checks argv[0] (which will be 'iptables' in this case) and executes the corresponding iptables functionality.
SUPPORTED EMULATED COMMANDS
xtables-multi can emulate a range of Netfilter commands, including but not limited to:
- iptables
- ip6tables
- arptables
- ebtables
- iptables-restore
- ip6tables-restore
- arptables-restore
- ebtables-restore
- iptables-save
- ip6tables-save
- arptables-save
- ebtables-save
The exact list might vary slightly based on the Netfilter package version and build configuration.
HISTORY
The concept of a multi-call binary like xtables-multi emerged as part of the broader Netfilter project in Linux. Its development was driven by the desire for efficiency and maintainability. By consolidating multiple related executables into a single binary, it reduces overhead, simplifies packaging for Linux distributions, and ensures consistency across different Netfilter tools. This design has been a standard practice for many years in modern Linux systems, reflecting a mature approach to managing the diverse set of Netfilter utilities.
SEE ALSO
iptables(8), ip6tables(8), arptables(8), ebtables(8), iptables-restore(8), iptables-save(8), ln(1)