[CentOS] iptables

Tue Sep 15 16:35:46 UTC 2009
Diogo Sperb Schneider <diogo at kildare.ind.br>

2009/9/15 Filipe Brandenburger <filbranden at gmail.com>:
> I suggest you use "iptables" commands to add and delete rules until
> you set the firewall the way you want, and when everything is ready
> use the "service iptables save" command, that will write a new
> /etc/sysconfig/iptables with the current rules you have.

Typing iptables commands alone may get boring, so you can also write
your own script, with variables and stuff to make things easier and
then use "service iptables save" when everything is OK. Keep your own
script around so you can test new rules. But you can rest assured that
if anything goes wrong, your firewall will always load the last saved
set of rules. That's what I do and it works just fine for me.