i want to know what is the difference between these two commands

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

-

iptables -A INPUT -p tcp --dport 80 -j ACCEPT
link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Nothing, since the tcp match is implicit when filtering the tcp protocol.

link|improve this answer
SO IT MEANS -m option is only important for STATE matches , otherwise no need to use for tcp , udp , icmp – John Aug 26 '10 at 6:23
If either no options imply a match or if an option implies multiple matches then you need to specify a match. Otherwise, iptables will figure out what you mean in the command line. – Ignacio Vazquez-Abrams Aug 26 '10 at 6:43
feedback

Your Answer

 
or
required, but never shown