Our router is CentOS but we just use iptables to modify Linux kernel firewall rules. There is a script that's under version control which resets all the chains/rules, but in doing so drops all existing connections and generally causes havoc if run during office hours. This means the usual method for altering the firewall rules is using iptables
'on-the-fly'. This can result in modifications to the firewall not making it back to version control.
What I'm trying to work out is how to check if there have been any modifications to the firewall since a particular version of the script in Subversion.
The output from iptables --list
is quite different from a line in the script which typically look something like iptables -A chain -j ACCEPT -s 192.168.1.100
.
Is there an easier/better way of keeping Linux kernel firewall rules under version control?
I'm open to suggestions of alternative tools or operating systems so long as they're open source and well established.