Originally Posted by qwertyjjj
What if you have already used a command like
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
How do you get that written to the file just by saving it?
I'm afraid that I did not get your question...
If you're asking about the command for addition of the lines to file then it is realised in script with $ipt >> /etc/sysconfig/iptables
It simple adds the line at the end of that file. Or you'd like to have more difficult script that don't add commands that are already written?
But if that line is not written yet then you do need to iptables-save > /etc/sysconfig/iptables