iptables -L INPUT --line-numbers -v
iptables -A INPUT -s 58.245.23.126/24 -j DROP
iptables -D INPUT 3
pre-up iptables-restore < firewall.txt
iptables rules are stored in memory. If the system is restarted, all rules are lost.
To save rules:
/sbin/service iptables save
This executes the iptables init script, which runs the /sbin/iptables-save program and writes the current iptables configuration to /etc/sysconfig/iptables. The existing /etc/sysconfig/iptables file is saved as /etc/sysconfig/iptables.save.
The next time the system boots, the iptables init script reapplies the rules saved in /etc/sysconfig/iptables by using the /sbin/iptables-restore command.