This discussion is archived
5 Replies Latest reply: Aug 25, 2013 8:53 PM by 975148 RSS

Query on –m option of iptables command

975148 Newbie
Currently Being Moderated

I have a query on the use of the –m option of iptables command in RHEL 6.0. I have seen commands like:

 

iptables –A INPUT –m state --state ESTABLISHED,RELATED –j ACCEPT

 

which makes quite good sense but the below command:

 

iptables –A PREROUTING -s 10.101.17.34 –d 10.101.15.84 –p tcp –m tcp --dport 443 –j REDIRECT –to-ports 30080

 

does not seem to be useful as tcp is already given against the –p option then what is the use of specifying –m option again with tcp. I am be wrong on this.

 

I hope my query is clear.

 

Please revert with the reply to my query.


Regards

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points