Make the iptables FORWARD chain rules optional #978
Merged
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.
Fixes kubernetes/kops#4037, projectcalico/canal#115, #938
Description
Add a flag to allow users to specify whether they want to add the default
ACCEPT
traffic rules to the iptablesFORWARD
chain, which was introduced in Flannel release v0.9.1 to support Docker versions 1.13 and later (where docker sets the default policy on theFORWARD
chain to drop).Users may need to disable this behaviour in certain scenarios such as documented in #938, where used in conjunction with Calico (when
FELIX_CHAININSERTMODE
is set toappend
), as it breaks network policy behaviour.Environment Variable: FLANNELD_IPTABLES_FORWARD_RULES
Command Line Option: iptables-forward-rules
Default Value: true (shouldn't break or modify existing behaviour)