Linux "iptables-restore" Command Line Options and Examples
Restore IP Tables

iptables-restore and ip6tables-restore are used to restore IP and IPv6 Tables from data specified on STDIN or in file. Use I/O redi‐ rection provided by your shell to read from a file or specify file as an argument. -c, --counters restore the values of all packet and byte counters -h, --help Print a short option summary.


Usage:

iptables-restore [-chntv] [-M modprobe] [-T name] [file]


    ip6tables-restore [-chntv] [-M modprobe] [-T name] [file]






Command Line Options:

-c
restore the values of all packet and byte counters
iptables-restore -c ...
-h
Print a short option summary.
iptables-restore -h ...
-n
don't flush the previous contents of the table. If not specified, both commands flush (delete) all previous contents of therespective table.
iptables-restore -n ...
-t
Only parse and construct the ruleset, but do not commit it.
iptables-restore -t ...
-v
Print additional debug info during ruleset processing.
iptables-restore -v ...
-M
Specify the path to the modprobe program. By default, iptables-restore will inspect /proc/sys/kernel/modprobe to determine theexecutable's path.
iptables-restore -M ...
-T
Restore only the named table even if the input stream contains other ones.BUGSNone known as of iptables-1.2.1 releaseAUTHORSHarald Welte <laforge@gnumonks.org> wrote iptables-restore based on code from Rusty Russell.Andras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-restore.
iptables-restore -T ...