[CentOS] /etc/sysconfig/iptables syntax

Mon May 23 05:39:15 UTC 2016
Barak Korren <bkorren at redhat.com>

>
> If I'm understanding correctly, write out all rules in a bash terminal and
> run them, and then do /usr/sbin/iptables-save ---
>
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbiniptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbiniptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbiniptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbin/iptables rule;
> ~#/usr/sbiniptables rule
>
> ~#/usr/sbin/iptables-save > /etc/sysconfig/iptables

Yep.
And you can copy '/etc/sysconfig/iptables' around if you have
identical machines and no machine-specific rules...
(Note, you can even port the rules from other Linux distros as
iptables-save exists there as well)

-- 
Barak Korren
bkorren at redhat.com
RHEV-CI Team