{
    "mode": "man",
    "parameter": "IPTABLES-RESTORE",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/IPTABLES-RESTORE/8/json",
    "generated": "2026-09-17T00:48:48Z",
    "synopsis": "iptables-restore [-chntvV] [-w seconds] [-M modprobe] [-T name] [file]\nip6tables-restore [-chntvV] [-w seconds] [-M modprobe] [-T name] [file]",
    "sections": {
        "NAME": {
            "content": "iptables-restore — Restore IP Tables\n\nip6tables-restore — Restore IPv6 Tables\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "iptables-restore [-chntvV] [-w seconds] [-M modprobe] [-T name] [file]\n\nip6tables-restore [-chntvV] [-w seconds] [-M modprobe] [-T name] [file]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "iptables-restore and ip6tables-restore are used to restore IP and IPv6 Tables from data spec‐\nified  on STDIN or in file. Use I/O redirection provided by your shell to read from a file or\nspecify file as an argument.\n",
            "subsections": [
                {
                    "name": "-c --counters",
                    "content": "Restore the values of all packet and byte counters.\n",
                    "flag": "-c",
                    "long": "--counters"
                },
                {
                    "name": "-h --help",
                    "content": "Print a short option summary.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-n --noflush",
                    "content": "Don't flush the previous contents of the table. If not specified, both commands  flush\n(delete) all previous contents of the respective table.\n",
                    "flag": "-n",
                    "long": "--noflush"
                },
                {
                    "name": "-t --test",
                    "content": "Only parse and construct the ruleset, but do not commit it.\n",
                    "flag": "-t",
                    "long": "--test"
                },
                {
                    "name": "-v --verbose",
                    "content": "Print  additional debug info during ruleset processing.  Specify multiple times to in‐\ncrease debug level.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "Print the program version number.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-w --wait",
                    "content": "Wait for the xtables lock.  To prevent multiple instances of the program from  running\nconcurrently,  an  attempt will be made to obtain an exclusive lock at launch.  By de‐\nfault, the program will exit if the lock cannot be obtained.  This  option  will  make\nthe  program  wait (indefinitely or for optional seconds) until the exclusive lock can\nbe obtained.\n",
                    "flag": "-w",
                    "long": "--wait"
                },
                {
                    "name": "-M --modprobe _",
                    "content": "Specify the path to the modprobe(8) program. By default, iptables-restore will inspect\n/proc/sys/kernel/modprobe to determine the executable's path.\n",
                    "flag": "-M",
                    "long": "--modprobe"
                },
                {
                    "name": "-T --table _",
                    "content": "Restore only the named table even if the input stream contains other ones.\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> wrote iptables-restore based on code from Rusty Russell.\nAndras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-restore.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "iptables-apply(8), iptables-save(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\niptables 1.8.10                                                                  IPTABLES-RESTORE(8)",
            "subsections": []
        }
    },
    "summary": "iptables-restore — Restore IP Tables  ip6tables-restore — Restore IPv6 Tables",
    "flags": [
        {
            "flag": "-c",
            "long": "--counters",
            "arg": null,
            "description": "Restore the values of all packet and byte counters."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print a short option summary."
        },
        {
            "flag": "-n",
            "long": "--noflush",
            "arg": null,
            "description": "Don't flush the previous contents of the table. If not specified, both commands flush (delete) all previous contents of the respective table."
        },
        {
            "flag": "-t",
            "long": "--test",
            "arg": null,
            "description": "Only parse and construct the ruleset, but do not commit it."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Print additional debug info during ruleset processing. Specify multiple times to in‐ crease debug level."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Print the program version number."
        },
        {
            "flag": "-w",
            "long": "--wait",
            "arg": null,
            "description": "Wait for the xtables lock. To prevent multiple instances of the program from running concurrently, an attempt will be made to obtain an exclusive lock at launch. By de‐ fault, the program will exit if the lock cannot be obtained. This option will make the program wait (indefinitely or for optional seconds) until the exclusive lock can be obtained."
        },
        {
            "flag": "-M",
            "long": "--modprobe",
            "arg": null,
            "description": "Specify the path to the modprobe(8) program. By default, iptables-restore will inspect /proc/sys/kernel/modprobe to determine the executable's path."
        },
        {
            "flag": "-T",
            "long": "--table",
            "arg": null,
            "description": "Restore only the named table even if the input stream contains other ones."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "iptables-apply",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables-apply/8/json"
        },
        {
            "name": "iptables-save",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables-save/8/json"
        },
        {
            "name": "iptables",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables/8/json"
        }
    ]
}