Here is an example. You can name the script something else if you want to.
Do this while logged in as Root
Save the firewall script as /etc/sysconfig/firewall.
Important: Set the permissions for root to read, write and exec. Also, read and exec for group and others.
Something like chomd 755 /etc/sysconfig/firewall aught to do it.
Edit the /etc/rc.d/rc.local file with a path to the script. /etc/sysconfig/firewall
Run the command: service iptables stop
Type: source /etc/sysconfig/firewall
Type: iptables-save > /etc/sysconfig/iptables
Run the command: service iptables restart