how can i change iptables rule's line number?

L

linjieli

Guest
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?
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top