-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] fix iptables rules to make them idempotent (#1214)
* Update iptables rules to make them idempotent * Add missing return statements * Fix catch logic error * Only catch one statement with try * Remove broken catches (sync code) * Move to explictly denying flux 172.23.0.0/16 and use DOCKER-USER chain * Add a bit more to docstring * Remove erroneous extra function call from testing * Greatly simplify how default gateway / local subnet is determined * Lint * Remove requirement for , will protect all operator networks * Modify rules slightly to match iptables output, add tests * Add allow for Flux networks, remove RETURN that docker keeps adding * Full refactor - see below This commit now blocks 100% of access to private address space, while maintaining isolation for each Flux docker network. Now apps can be sure no other app is snooping their traffic, and operators can be sure that apps do not have access to ANY private network they are routing. Tests will all be broken - I'll fix up in next commit. * Lint * Update tests * Move the docker interface fetch up a level to avoid circular * Add dockerService to serviceManager, fix up tests * Fix typing for return * Stub console output (from Flux log) so it doesn't clog up the testing output * Add missing remove private stanza for softInstallLocally * Update compatibility with older iptables 1.8.4 - see below Older iptables (legacy) on ubuntu 20.04 operates slightly differently than the nf_tables version, the check output command doesn't return anything. Some of the output strings are different, so we don't check those anymore. Have also added a check to make sure the iptables binary is in the root users path. * Add iptables exists check and fix up tests
- Loading branch information
David White
authored
Feb 21, 2024
1 parent
8fbfecd
commit 28fe33e
Showing
6 changed files
with
565 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.