-
Notifications
You must be signed in to change notification settings - Fork 672
Move weave-npc checks to top of FORWARD chain #3210
Conversation
1a543c6
to
0952194
Compare
https://circleci.com/gh/weaveworks/weave/9969 is a demonstration of the problem |
bb7de39
to
553433c
Compare
I like the idea of the chain simplification, but as discussed on Slack, moving However, we have another time window due to I suggest to create another level of indirection - a new chain WEAVE-NPC-FOOBAR which would contain |
The idea of this rule was to allow non-pod traffic; that change would disallow non-pod traffic originating on this machine. Maybe that's a niche case. |
net/bridge.go
Outdated
} | ||
if err = ipt.AppendUnique("filter", "FORWARD", "-o", config.WeaveBridgeName, "-j", "DROP"); err != nil { | ||
// Use insert rather than append to try to get ahead of any ACCEPT rules which would defeat our policies | ||
if err = insertUnique(ipt, "filter", "FORWARD", 1, "-o", config.WeaveBridgeName, "-j", "WEAVE-NPC"); err != nil { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This needs rebasing after #3204 has been merged. Happy to do if you are busy. |
553433c
to
5a13611
Compare
We want our DROP rule to be executed ahead of any ACCEPT rules which might have been added by another program on the system.
Rebased and simplified. |
We want our DROP rule to be executed ahead of any ACCEPT rules which might have been added by another program on the host.
Since #3204 gave us the framework to ensure we are recreating every rule, just inserting them all at the top, in order, works nicely.
I also moved the NFLOG and DROP rules from FORWARD to WEAVE-NPC to simplify the logic about which order they come in.Extend kubernetes test to include the circumstances that trigger the issue.
Fixes #3209