Many Iptables rules contain this -m or --match option, for example
-I INPUT -p tcp -m state --state NEW -m limit --limit 30/minute --limit-burst 5 -j ACCEPT
-A INPUT -p udp -m conntrack --ctstate NEW -j UDP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j TCP
-A INPUT -p icmp -m conntrack --ctstate NEW -j ICMP
Is this -m or --match simply "special" option which is a precursor to an "normal" option?
for example, with this rule
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j TCP
Does the term -m tcp say to Iptables, the next option that follows will be intended for the tcp module - then the --tcp-flags FIN,SYN,RST,ACK SYN term will be interpreted in that context?
To put it another way, would the option -m tcp be meaningless if it was specified by itself inside an Iptables rule?
-m tcpoption enables the tcp extended packet matching module, which itself provides the--tcp-flagsoption. So yes-m tcpmay be meaningless if none of the extensions provided by the module are used. – Marc Ransome Nov 09 '15 at 08:20man iptables-extensionsnot available, look inman iptablesand search forEXTENSIONS– user12345 Sep 07 '18 at 23:02