-
Notifications
You must be signed in to change notification settings - Fork 48
Calico should override bootstrap iptables rules #137
Comments
This seems very weird, because we rely on calico rules to open port 80 and 443, for example. Are you saying it does work for these ports but not for others? Or calico rules don't really open ports at all? |
It looks like I'm able to reach |
Same with |
This is now fixed by #201, but we still need to have some tests to prevent this from happening in the future. |
Well, #201 fixes it only partially. The bootstrap rules are still not overridden by Calico and as they are broader, they still have an effect. E.g.:
bootstrap rule is broader than following GNP:
|
@invidian that should be a regression too. I know for a fact that the calico ssh rules take precedence over the bootstrap iptables rules before the helm refactors. We are either testing incorrectly or regressed, quite sure :) |
Well, what is shown there is that the rule still exist. That doesn't really matter in iptables, if other rules reject the traffic before this rule is matched. Have you tested that too? That is the test we want to do, IMHO (so, my first bet regarding #137 (comment) is that we didn't test, just looked at the iptables output?) We need to check whether it makes sense to override the rules per se or just want that calico enforces it's policies (i.e. the rules might be present, but after a I think we want that calico enforces it's policies, not sure about failure scenarios to decide weather to keep the rules or not. |
Yes, I tested it, with Calico rules, I'm still able to SSH to nodes from any public IP address, while it should only allow me to SSH from the management CIDRs. |
So the CIDRs are even enforced before calico is up. Refs #137 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So the CIDRs are even enforced before calico is up. Refs #137 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit adds initial test for Calico, which checks, that each Node object in the cluster has associated HostEndpoint Calico object, which ensures, that GlobalNetworkPolicy objects take effect. Refs #137. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit adds initial test for Calico, which checks, that each Node object in the cluster has associated HostEndpoint Calico object, which ensures, that GlobalNetworkPolicy objects take effect. Refs #137. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit adds initial test for Calico, which checks, that each Node object in the cluster has associated HostEndpoint Calico object, which ensures, that GlobalNetworkPolicy objects take effect. Refs #137. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Currently, we add bootstrap itpables rules in Packet here: https://github.com/kinvolk/lokomotive/blob/master/assets/lokomotive-kubernetes/packet/flatcar-linux/kubernetes/cl/controller.yaml.tmpl#L267, which apply to all interfaces.
Then we create Calico rules here: https://github.com/kinvolk/lokomotive/blob/master/assets/lokomotive-kubernetes/packet/flatcar-linux/kubernetes/calico-host-protection/templates/host-protection.yaml#L37.
However, modify Calico rules is not sufficient to open some ports, as bootstrap iptables rules are still enforced. This is confusing (e.g. see #120).
I think we should investigate that and make sure, that Calico rules always take precedence over bootstrap rules.
The text was updated successfully, but these errors were encountered: