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

Re: Iptables not saving...



On Sun, May 07, 2006 at 22:22:38 -0400,
  Devon Harding <devonharding gmail com> wrote:
> I got it working by putting this command in my /etc/rc.local:
> 
> /sbin/iptables-restore < /etc/sysconfig/iptables
> 
> Not sure why this even works, but it does...

You shouldn't have to do that. That you had to do this suggests that you
don't have your firewall service(s) (iptables and optionally ip6tables)
turned on.

You generally want them turned on as soon as you turn on networking.

You can see whether on this is true using chkconfig, such as:
[bruno wolff ~]$ chkconfig --list iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

If it isn't on for levels 2, 3, 4, and 5 you can change this using:
chkconfig --levels 2345 iptables on

Because the supplied init script specifies that this service is supposed to
be used in levels 2, 3, 4 and 5 when it is running, you should be able to
simplify the above to:
chkconfig iptables on


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