-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 the iptables FORWARD chain rule additions optional #938
Comments
Any thoughts on this? |
+1 I'm trying to implement network policy in my CNI plugin and having the same problem. |
gambol99
added a commit
to gambol99/kops
that referenced
this issue
Oct 12, 2018
Fixed in Release v0.11.0 Set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
FELIX_CHAININSERTMODE
toappend
in the canal manifest fileiptables -nv -L FORWARD
Current Behavior
Flannel v0.9.1 includes a change to add 2 rules to the FORWARD chain (#872). When Calico is configured with
append
mode, the Calico rule is added to the bottom of the chain, resulting in the following rule order:Because of this, the
cali-FORWARD
rule is never hit and all traffic in/out is accepted by default. This means that k8s ingress/egress network policies will have no effect.You won't encounter this issue if the chain insert mode isn't set to append (it is
insert
by default). Flannel will still add 2 rules to the forward chain, but they will never be hit because the calico rule is processed first.Possible Solution
One suggestion would be to provide a flag to flannel such as
"AddIPTablesForwardRules": false
.Context
I'm performing these deployments using kops v1.8.0, and the relevant manifest file is located here: https://github.com/kubernetes/kops/blob/1.8.0/upup/models/cloudup/resources/addons/networking.projectcalico.org.canal/k8s-1.8.yaml.template
I set
FELIX_CHAININSERTMODE
toappend
so that I can insert rules at the top of theINPUT
andFORWARD
chains to process specific globalREJECT
rules before the network policies take effect (preventing pods communicating with ETCD API, Kube API, AWS meta-data endpoint, etc).Your Environment
CC @tomdee
Related issues:
The text was updated successfully, but these errors were encountered: