1 - Get the iptables rules list with the line numbers enabled
$ iptables -nL –line-numbers
2 - Look up the line number you want to use and insert your rule.
( I am inserting a rule at line number 10, the existing rule will shift down)
$ sudo /sbin/iptables -I INPUT 10 -s 202.54.1.1 -j DROP -m comment --comment "DROP spam IP address - "
3 - Save the rules to a file in etc so you can reload them at the next reboot
$ sudo /sbin/iptables-save > /etc/iptables.local
4 - To make the rules persistent, add the following rule to your /etc/rc.local file)
sudo /sbin/iptables-restore < /etc/iptables.local
If your system reboots you will not loose the rules now.
Aruna