5 Replies Latest reply on Aug 26, 2013 3:53 AM by 975148

    Query on –m option of iptables command


      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 –d –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.