Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flushing on restart truly optional #87

Closed
wants to merge 2 commits into from

Conversation

isuftin
Copy link

@isuftin isuftin commented Jul 30, 2021

This update adds the conditional check for firewall_flush_rules_and_chains to also not include ExecStop when false.

A side effect of that is that the bash script that triggers on restart will add the same rules to iptables again, duplicating the rules.

Running iptables-save | awk '/^COMMIT$/ { delete x; }; !x[$0]++' | uniq | iptables-restore after all rules have been (re)added will read iptables, remove duplicates and persist the rules.

This operation is probably only needed when we're not flushing on restart but otoh it also doesn't hurt to scrub dupe rules from iptables as a general practice?

@isuftin
Copy link
Author

isuftin commented Aug 2, 2021

Implements #82

@stale
Copy link

stale bot commented Nov 1, 2021

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

@stale
Copy link

stale bot commented Dec 2, 2021

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.

@stale stale bot closed this Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant