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.

The manual isn't very clear, and the online articles & tutorials don't bother to explain it.

What's the significance of -m tcp and -p tcp used together? It seems so redundant, it bothers me...

Thanks

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If using -p tcp, -m tcp shouldn't be necessary. From the manual page for iptables:

iptables can use extended packet matching modules. These are loaded in two ways: implicitly, when -p or --protocol is specified, or with the -m or --match options, followed by the matching module name; after these, various extra command line options become available, depending on the specific module.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.