{
    "content": [
        {
            "type": "text",
            "text": "# iptables-restore(8) (man)\n\n**Summary:** iptables-restore — Restore IP Tables  ip6tables-restore — Restore IPv6 Tables\n\n**Synopsis:** iptables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]\nip6tables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -c | --counters | — | restore the values of all packet and byte counters |\n| -h | --help | — | Print a short option summary. |\n| -n | --noflush | — | don't flush the previous contents of the table. If not specified, both commands flush (delete) all previous contents of  |\n| -t | --test | — | Only parse and construct the ruleset, but do not commit it. |\n| -v | --verbose | — | Print additional debug info during ruleset processing. |\n| -V | --version | — | Print the program version number. |\n| -w | --wait | — | Wait for the xtables lock. To prevent multiple instances of the program from running concurrently, an attempt will be ma |\n| -W | --wait-interval | — | Interval to wait per each iteration. When running latency sensitive applications, waiting for the xtables lock for exten |\n| -M | --modprobe | — | Specify the path to the modprobe program. By default, iptables-restore will inspect /proc/sys/kernel/modprobe to determi |\n| -T | --table | — | Restore only the named table even if the input stream contains other ones. |\n\n## See Also\n\n- iptables-apply(8)\n- iptables-save(8)\n- iptables(8)\n- IPTABLES-RESTORE(8)\n\n## Section Outline\n\n- **NAME** (4 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (4 lines) — 10 subsections\n  - -c --counters (2 lines)\n  - -h --help (2 lines)\n  - -n --noflush (3 lines)\n  - -t --test (2 lines)\n  - -v --verbose (2 lines)\n  - -V --version (2 lines)\n  - -w --wait (6 lines)\n  - -W --wait-interval (5 lines)\n  - -M --modprobe (3 lines)\n  - -T --table (2 lines)\n- **BUGS** (2 lines)\n- **AUTHORS** (3 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\niptables-restore — Restore IP Tables\n\nip6tables-restore — Restore IPv6 Tables\n\n### SYNOPSIS\n\niptables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]\n\nip6tables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]\n\n### DESCRIPTION\n\niptables-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\n#### -c --counters\n\nrestore the values of all packet and byte counters\n\n#### -h --help\n\nPrint a short option summary.\n\n#### -n --noflush\n\ndon't  flush the previous contents of the table. If not specified, both commands flush\n(delete) all previous contents of the respective table.\n\n#### -t --test\n\nOnly parse and construct the ruleset, but do not commit it.\n\n#### -v --verbose\n\nPrint additional debug info during ruleset processing.\n\n#### -V --version\n\nPrint the program version number.\n\n#### -w --wait\n\nWait 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\n#### -W --wait-interval\n\nInterval to wait per each iteration.  When  running  latency  sensitive  applications,\nwaiting for the xtables lock for extended durations may not be acceptable. This option\nwill make each iteration take the amount of time specified. The default interval is  1\nsecond. This option only works with -w.\n\n#### -M --modprobe\n\nSpecify  the  path  to the modprobe program. By default, iptables-restore will inspect\n/proc/sys/kernel/modprobe to determine the executable's path.\n\n#### -T --table\n\nRestore only the named table even if the input stream contains other ones.\n\n### BUGS\n\nNone known as of iptables-1.2.1 release\n\n### AUTHORS\n\nHarald Welte <laforge@gnumonks.org> wrote iptables-restore based on code from Rusty Russell.\nAndras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-restore.\n\n### SEE ALSO\n\niptables-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\n\n\niptables 1.8.7                                                                   IPTABLES-RESTORE(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "iptables-restore",
        "section": "8",
        "mode": "man",
        "summary": "iptables-restore — Restore IP Tables  ip6tables-restore — Restore IPv6 Tables",
        "synopsis": "iptables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]\nip6tables-restore [-chntvV] [-w secs] [-W usecs] [-M modprobe] [-T name] [file]",
        "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."
            },
            {
                "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": "-W",
                "long": "--wait-interval",
                "arg": null,
                "description": "Interval to wait per each iteration. When running latency sensitive applications, waiting for the xtables lock for extended durations may not be acceptable. This option will make each iteration take the amount of time specified. The default interval is 1 second. This option only works with -w."
            },
            {
                "flag": "-M",
                "long": "--modprobe",
                "arg": null,
                "description": "Specify the path to the modprobe 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"
            },
            {
                "name": "IPTABLES-RESTORE",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/IPTABLES-RESTORE/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "-c --counters",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--counters"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-n --noflush",
                        "lines": 3,
                        "flag": "-n",
                        "long": "--noflush"
                    },
                    {
                        "name": "-t --test",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-w --wait",
                        "lines": 6,
                        "flag": "-w",
                        "long": "--wait"
                    },
                    {
                        "name": "-W --wait-interval",
                        "lines": 5,
                        "flag": "-W",
                        "long": "--wait-interval"
                    },
                    {
                        "name": "-M --modprobe",
                        "lines": 3,
                        "flag": "-M",
                        "long": "--modprobe"
                    },
                    {
                        "name": "-T --table",
                        "lines": 2,
                        "flag": "-T",
                        "long": "--table"
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}