iptables-save

Save the iptables IPv4 configuration. Use ip6tables-save to to the same for IPv6. More information: <https://manned.org/iptables-save>.

Install

All systems
curl cmd.cat/iptables-save.sh
Debian Debian
apt-get install iptables
Ubuntu
apt-get install iptables
Alpine
apk add iptables
Arch Arch Linux
pacman -S iptables
image/svg+xml Kali Linux
apt-get install iptables
CentOS
yum install iptables
Fedora
dnf install iptables
Windows (WSL2)
sudo apt-get update sudo apt-get install iptables
Raspbian
apt-get install iptables
Docker
docker run cmd.cat/iptables-save iptables-save powered by Commando

Save the iptables IPv4 configuration. Use ip6tables-save to to the same for IPv6. More information: <https://manned.org/iptables-save>.

  • Print the `iptables` configuration:
    sudo iptables-save
  • Print the `iptables` configuration of a specific [t]able:
    sudo iptables-save --table table
  • Save the `iptables` configuration to a [f]ile:
    sudo iptables-save --file path/to/file

© tl;dr; authors and contributors