sentinel-firewall: remove any preserved rules
This removes any preserved rules from firewall. Firewall3 removes any rules in chains and tables it manages but others ignores. This is considered as feature (as some lists survive reload) but for our use case it is not ideal as scripts just insert rules in appropriate location. Instead removing all rules we previously added and were preserved is better option in this case. There is one exception and those are our rules that are terminations for chains created by us. We are not removing those chains and so we do not want to remove those rules as well. We prevent that by using slightly different comment. We do not add additional commentary and drop colon. Because of missing colon this rule is not matched and is not removed. For termination rule additional comment about source is not necessary so we are not loosing anything.
Please register or sign in to comment