Re: /etc/sysconfig/iptables syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, May 22, 2016 at 11:55 PM, Barak Korren <bkorren@xxxxxxxxxx> wrote:

> בתאריך 23 במאי 2016 05:56,‏



> The syntax comes from the output of the 'iptables-save' command.
> You can configure 'iptables' from the command line as you normally would
> and then run
>
> iptables-save > /etc/sysconfig/iptables
>
> On centos<=6 the init.d script also included a 'save' command to do it for
> you, I'm not sure about the systemd unit file though.
>
> HTH,
> Barak _______________________________________________
>


Hi Barak,

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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux