5 Replies Latest reply: Aug 25, 2013 10:53 PM by 975148 RSS

    Query on –m option of iptables command

    975148

      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