Linux: security: iptables/ip6tables 手册中一个容易让人误入坑的地方

https://linux.die.net/man/8/ip6tables

在说明文档里有[–soft] Matches if the packet includes all specified headers with --header, AT LEAST.

其实单从字面理解–soft,不看具体的解释的时候,容易让人理解为:–header里的选项,是软匹配,不是完全匹配里面的所有header,而是匹配某一个header。尤其是–soft选项和–header选项的挨得又近,很容易让人联想说,他们之间的关系就是一个松弛的header匹配。

但是具体看解释的话,就不是这个意思。解释是说至少要满足 --header的条件,而不是说header 里有几个header,其中的一个 header 满足。

--header [!] header[,header...]

Matches the packet which EXACTLY includes all specified headers. The headers encapsulated with ESP header are out of scope. header can behop|hop-by-hop (Hop-by-Hop Options header), dst (Destination Options header), route (Routing header), frag (Fragment header), auth (Authentication header), esp (Encapsulating Security Payload header), none (No Next header) which matches 59 in the 'Next Header field' of IPv6 header or any IPv6 extension headers, or proto which matches any upper layer

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/132217653