Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.