「iptables-restore(8)」-

恢复IP表

命令语法格式

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

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

命令描述

命令iptables-restore和ip6tables-restore用于从文件(或标准输入)中指定的数据来恢复IPv4和IPv6表。使用Shell提供的I/O重定向从文件读取或指定文件作为参数。

命令支持的选项及含义

-c, –counters
恢复所有数据包和字节计数器的值

-M, –modprobe modprobe_program
指定modprobe程序的路径。 默认情况下,iptables-restore将检查/proc/sys/kernel/modprobe以确定可执行文件的路径。

-T, –table name
即使输入流包含其他表,也只恢复由name指定的表。

-n, –noflush
不要刷新表的先前内容。如果未指定,则两个命令都刷新(flush、delete)相应表的所有先前内容。

-t, –test
仅解析和构造规则集,但不提交它。

-v, –verbose
在规则集处理期间,打印其他调试信息。

-h, –help
显示一个简短的选项摘要。

相关手册

iptables-apply(8),iptables-save(8), iptables(8)

iptables-HOWTO详细说明了更多的iptables用法;NAT-HOWTO详细介绍了NAT;netfilter-hacking-HOWTO详细介绍了内部结构。

参考文献

  • man 8 iptables-restore, Version 1.6.0+snapshot20161117-6

更新日志

  • 09/15/2018 创建文章