这个命令是什么意思:
iptables -t filter -X
的目的是什么-X
?和
有什么区别?-X
-F
答案1
所有这些问题都可以在手册页中得到解答(参见man iptables
命令行):
-F, --flush [chain]
Flush the selected chain (all the chains in the table if none is given).
This is equivalent to deleting all the rules one by one.
-X, --delete-chain [chain]
Delete the optional user-defined chain specified. There must be no references
to the chain. If there are, you must delete or replace the referring rules
before the chain can be deleted. The chain must be empty, i.e. not contain any
rules If no argument is given, it will attempt to delete every non-builtin
chain in the table.
虽然你没有问,但-t
这里有一点点(我在这里删除了大部分数据,因为它们都可以读取man iptables
):
-t, --table table
This option specifies the packet matching table which the command should
operate on. If the kernel is configured with automatic module loading,
an attempt will be made to load the appropriate module for that table if it
is not already there.