Closed
Conversation
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
6564641 to
7c4e0d6
Compare
After enabling IP forwarding in the kernel, for nftables only, don't set the forwarding policy to "drop". It's the user's responsibility to secure their host when they run Docker with nftables. Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
7c4e0d6 to
5696b1e
Compare
Contributor
Author
|
Next new plan ... #50646 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
When Docker is using iptables and it enables IP forwarding, unless daemon option
--ip-forward-no-dropis true, it sets the iptables filter-FORWARD policy to DROP.When running with nftables - don't do that, just turn the host into a router. Docs will need an update to say it's the user's responsibility to update their firewall rules to block unwanted forwarding between non-Docker network interfaces.
Log a warning about that when enabling forwarding.
Log a warning when migrating from iptables to nftables when the iptables policy is DROP, because it'll drop packets that have been accepted by nftables rules (so, for example, published ports won't work).
- How I did it
The first two commits are tidy-up - only nftabler needs an iptables cleaner, and only the iptabler (now) needs a method to set the filter-FORWARD policy. So, use those types directly in the bridge driver when needed.
The third commit drops the policy-setting from nftables and updates tests.
The final commit adds a warning about the iptables policy on migration to nftables.
- How to verify it
Start Docker with IP forwarding disabled and --firewall-backend=iptables - check the filter-FORWARD policies are DROP.
Start Docker again with --firewall-backend=nftables, check logs for a warning about the iptables policy.
Disable IP forwarding, restart with nftables, check for a warning about the firewall rules.
And, updated tests.
- Human readable description for the release notes
- nftables: Docker will enable IP forwarding on the host, but it's the user's responsibility to modify the host's firewall rules to block forwarding between non-Docker interfaces if necessary.