My server is Red Hat Enterprise Linux Server release 5.
What is the correct/proper command to clear all existing iptables rules defined in
/etc/sysconfig/iptables (so that I can start defining/adding my new rules)?
Install system-config-firewall and setuptool RPMs. Start "setup", go to "Firewall configuration" and disable the firewall.
Add your own rules.
Start setup and enable the firewall.
Flush iptables using: /etc/init.d/iptables stop
Add your own rules and save the change with:
Start the configuration:
Update the file with the current rules (not needed after the above steps but for further references)