commands.sh

iptables-save

linux

Save the `iptables` IPv4 configuration. Use `ip6tables-save` to do the same for IPv6.

More info →

Options (2)

-t, --tableboolean

Print the `iptables` configuration of a specific table

Example: sudo iptables-save {{[-t|--table]}} {{table}}
-f, --fileboolean

Save the `iptables` configuration to a file

Example: sudo iptables-save {{[-f|--file]}} {{path/to/file}}

Examples (3)

Print the `iptables` configuration

Print the `iptables` configuration of a specific table

sudo iptables-save [-t|--table] table

Save the `iptables` configuration to a file

sudo iptables-save [-f|--file] path/to/file
made by @shridhargupta | data from tldr-pages