{
    "mode": "man",
    "parameter": "iptables-save",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/iptables-save/8/json",
    "generated": "2026-05-30T07:08:35Z",
    "synopsis": "iptables-save [-M modprobe] [-c] [-t table] [-f filename]\nip6tables-save [-M modprobe] [-c] [-t table] [-f filename]",
    "sections": {
        "NAME": {
            "content": "iptables-save — dump iptables rules\n\nip6tables-save — dump iptables rules\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "iptables-save [-M modprobe] [-c] [-t table] [-f filename]\n\nip6tables-save [-M modprobe] [-c] [-t table] [-f filename]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "iptables-save  and ip6tables-save are used to dump the contents of IP or IPv6 Table in easily\nparseable format either to STDOUT or to a specified file.\n",
            "subsections": [
                {
                    "name": "-M --modprobe",
                    "content": "Specify the path to the modprobe  program.  By  default,  iptables-save  will  inspect\n/proc/sys/kernel/modprobe to determine the executable's path.\n",
                    "flag": "-M",
                    "long": "--modprobe"
                },
                {
                    "name": "-f --file",
                    "content": "Specify  a  filename to log the output to. If not specified, iptables-save will log to\nSTDOUT.\n",
                    "flag": "-f",
                    "long": "--file"
                },
                {
                    "name": "-c --counters",
                    "content": "include the current values of all packet and byte counters in the output\n",
                    "flag": "-c",
                    "long": "--counters"
                },
                {
                    "name": "-t --table",
                    "content": "restrict output to only one table. If the kernel is configured with  automatic  module\nloading,  an  attempt will be made to load the appropriate module for that table if it\nis not already there.\nIf not specified, output includes all available tables.\n",
                    "flag": "-t",
                    "long": "--table"
                }
            ]
        },
        "BUGS": {
            "content": "None known as of iptables-1.2.1 release\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Harald Welte <laforge@gnumonks.org>\nRusty Russell <rusty@rustcorp.com.au>\nAndras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-save.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "iptables-apply(8),iptables-restore(8), iptables(8)\n\nThe iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, which details NAT,  and\nthe netfilter-hacking-HOWTO which details the internals.\n\n\n\niptables 1.8.7                                                                      IPTABLES-SAVE(8)",
            "subsections": []
        }
    },
    "summary": "iptables-save — dump iptables rules  ip6tables-save — dump iptables rules",
    "flags": [
        {
            "flag": "-M",
            "long": "--modprobe",
            "arg": null,
            "description": "Specify the path to the modprobe program. By default, iptables-save will inspect /proc/sys/kernel/modprobe to determine the executable's path."
        },
        {
            "flag": "-f",
            "long": "--file",
            "arg": null,
            "description": "Specify a filename to log the output to. If not specified, iptables-save will log to STDOUT."
        },
        {
            "flag": "-c",
            "long": "--counters",
            "arg": null,
            "description": "include the current values of all packet and byte counters in the output"
        },
        {
            "flag": "-t",
            "long": "--table",
            "arg": null,
            "description": "restrict output to only one table. If the kernel is configured with automatic module loading, an attempt will be made to load the appropriate module for that table if it is not already there. If not specified, output includes all available tables."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "iptables-apply",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables-apply/8/json"
        },
        {
            "name": "iptables-restore",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables-restore/8/json"
        },
        {
            "name": "iptables",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables/8/json"
        },
        {
            "name": "IPTABLES-SAVE",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/IPTABLES-SAVE/8/json"
        }
    ]
}