Iptables not saving...

Devon Harding devonharding at gmail.com
Sun May 7 23:48:39 UTC 2006


>iptables-save outputs current rules to stdin.
>If you want them to be saved, redirect output not to
>/dev/null but /etc/sysconfig/iptables .

I forgot to mention that my cron job was already updated to output to
a regular file, but even this still does not work.  Chains are gone
after reboot.

[root at mars ~]# cat /etc/cron.hourly/iptables.cron
#!/bin/sh
/sbin/iptables-save > /etc/sysconfig/iptables

>
> Use "service iptables save" to save the current rules for use on the next
> reboot.
>

When I do that, after I reboot, I get this:

[root at mars ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination




More information about the users mailing list