-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Tue Dec 28 02:55:54 2010
The iptables_rules() function is no longer present, also gone are the lines like "KERNEL_SECURITY="yes"".
It seems to me that my firewall configuration files have been corrupted somehow, is there a way for me to restore all of them to their factory defaults? Afterwards, how do I safely edit my firewall configuration?
I'm running Stable and haven't used this GUI before, but a quick test of running ServerBox and just clicking "Save" did indeed mangle it completely.
- The 2nd line of /etc/init.d/firewall.sh shows this file is not parsed by IPTables but run as a set of commands, which is why the errors are raised. The shell obviously cannot understand "-A INPUT -i eth0 -p tcp -m tcp --sport 80 -j ACCEPT" as a command. - Looking at the source for /usr/bin/serverbox, iptables-save/-restore is run when the buttons clicked, and I don't think this is necessary. These two commands seem to be for applying the currently-running configuration, rather than the contents of the file. - It is between these two points that the bug lies.
The fix would be to restore the default from a SliTaz LiveCD, edit the file in the editor that opens (Leafpad or similar), File>Save it, then run `/etc/init.d/firewall restart`.
I'm not wholly knowledgeable about IPTables so can't quite grasp why the save/restore commands are used, perhaps it just needs explaining or the UI improving. Perhaps renaming the button to "Restore", and an "Apply" one that just executes `/etc/init.d/firewall restart` should be added...