{
    "content": [
        {
            "type": "text",
            "text": "# ip6tables-apply(8) (man)\n\n**Summary:** iptables-apply - a safer way to update iptables remotely\n\n**Synopsis:** iptables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]}\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -t | --timeout | — | Sets the timeout in seconds after which the script will roll back to the previous ruleset (default: 10). |\n| -w | --write | — | Specify the savefile where successfully applied rules will be written to (default if empty string is given: /etc/network |\n| -c | --command | — | Run command runcmd to configure iptables instead of applying a rulesfile (default: /etc/network/iptables.up.run). |\n| -h | --help | — | Display usage information. |\n| -V | --version | — | Display version information. |\n\n## See Also\n\n- iptables-restore(8)\n- iptables-save(8)\n- iptables(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (14 lines)\n- **OPTIONS** (1 lines) — 5 subsections\n  - -t --timeout (3 lines)\n  - -w --write (3 lines)\n  - -c --command (3 lines)\n  - -h --help (2 lines)\n  - -V --version (2 lines)\n- **SEE ALSO** (2 lines)\n- **LEGALESE** (12 lines)\n\n## Full Content\n\n### NAME\n\niptables-apply - a safer way to update iptables remotely\n\n### SYNOPSIS\n\niptables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]}\n\n### DESCRIPTION\n\niptables-apply  will  try  to  apply  a  new  rulesfile  (as output by iptables-save, read by\niptables-restore) or run a command to configure iptables and then prompt the user whether the\nchanges are okay. If the new iptables rules cut the existing connection, the user will not be\nable to answer affirmatively. In this case, the script rolls back  to  the  previous  working\niptables rules after the timeout expires.\n\nSuccessfully  applied  rules  can  also be written to savefile and later used to roll back to\nthis state. This can be used to implement a store  last  good  configuration  mechanism  when\nexperimenting with an iptables setup script: iptables-apply -w /etc/network/iptables.up.rules\n-c /etc/network/iptables.up.run\n\nWhen called as ip6tables-apply, the script will use ip6tables-save/-restore and IPv6  default\nvalues instead. Default value for rulesfile is '/etc/network/iptables.up.rules'.\n\n### OPTIONS\n\n#### -t --timeout\n\nSets  the  timeout  in  seconds  after which the script will roll back to the previous\nruleset (default: 10).\n\n#### -w --write\n\nSpecify the savefile where successfully applied rules will be written to  (default  if\nempty string is given: /etc/network/iptables.up.rules).\n\n#### -c --command\n\nRun  command  runcmd  to  configure iptables instead of applying a rulesfile (default:\n/etc/network/iptables.up.run).\n\n#### -h --help\n\nDisplay usage information.\n\n#### -V --version\n\nDisplay version information.\n\n### SEE ALSO\n\niptables-restore(8), iptables-save(8), iptables(8).\n\n### LEGALESE\n\nOriginal iptables-apply - Copyright 2006 Martin F. Krafft <madduck@madduck.net>.  Version 1.1\n- Copyright 2010 GW <gw.2010@tnode.com or http://gw.tnode.com/>.\n\nThis  manual  page  was  written by Martin F. Krafft <madduck@madduck.net> and extended by GW\n<gw.2010@tnode.com or http://gw.tnode.com/>.\n\nPermission is granted to copy, distribute and/or modify this document under the terms of  the\nArtistic License 2.0.\n\n\n\niptables 1.8.7                                                                     IPTABLES-APPLY(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ip6tables-apply",
        "section": "8",
        "mode": "man",
        "summary": "iptables-apply - a safer way to update iptables remotely",
        "synopsis": "iptables-apply [-hV] [-t timeout] [-w savefile] {[rulesfile]|-c [runcmd]}",
        "flags": [
            {
                "flag": "-t",
                "long": "--timeout",
                "arg": null,
                "description": "Sets the timeout in seconds after which the script will roll back to the previous ruleset (default: 10)."
            },
            {
                "flag": "-w",
                "long": "--write",
                "arg": null,
                "description": "Specify the savefile where successfully applied rules will be written to (default if empty string is given: /etc/network/iptables.up.rules)."
            },
            {
                "flag": "-c",
                "long": "--command",
                "arg": null,
                "description": "Run command runcmd to configure iptables instead of applying a rulesfile (default: /etc/network/iptables.up.run)."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display usage information."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "iptables-restore",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/iptables-restore/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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-t --timeout",
                        "lines": 3,
                        "flag": "-t",
                        "long": "--timeout"
                    },
                    {
                        "name": "-w --write",
                        "lines": 3,
                        "flag": "-w",
                        "long": "--write"
                    },
                    {
                        "name": "-c --command",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--command"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LEGALESE",
                "lines": 12,
                "subsections": []
            }
        ]
    }
}