how can i change iptables rule's line number?

Discussion in 'General Linux' started by linjieli, Oct 9, 2012.

  1. linjieli

    linjieli New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    If I have a iptables rule it's line number is 2,like below:
    Chain INPUT (policy ACCEPT 4 packets, 614 bytes)
    num pkts bytes target port opt in out source destination
    1 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 cstate RELATED,ESTABLISHED
    2 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
    Now I want to change the rule's line number is 2 to 1, how can I do that?

Share This Page