Add comment about the FORWARD rule order
Should help debugging.
This commit is contained in:
1 parent
439b4ad190
commit
9a5514ffe0
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -449,7 +449,9 @@ func configureIPTables(config *BridgeConfig) error {
|
|||||||
// If WEAVE-NPC chain doesn't exist then creating a rule in the chain will fail
|
// If WEAVE-NPC chain doesn't exist then creating a rule in the chain will fail
|
||||||
fwdRules = append(fwdRules,
|
fwdRules = append(fwdRules,
|
||||||
[][]string{
|
[][]string{
|
||||||
{"-o", config.WeaveBridgeName, "-j", "WEAVE-NPC"},
|
{"-o", config.WeaveBridgeName,
|
||||||
|
"-m", "comment", "--comment", "NOTE: this must go before '-j KUBE-FORWARD'",
|
||||||
|
"-j", "WEAVE-NPC"},
|
||||||
{"-o", config.WeaveBridgeName, "-m", "state", "--state", "NEW", "-j", "NFLOG", "--nflog-group", "86"},
|
{"-o", config.WeaveBridgeName, "-m", "state", "--state", "NEW", "-j", "NFLOG", "--nflog-group", "86"},
|
||||||
{"-o", config.WeaveBridgeName, "-j", "DROP"},
|
{"-o", config.WeaveBridgeName, "-j", "DROP"},
|
||||||
}...)
|
}...)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ IPT_BEFORE=$(mktemp)
|
|||||||
IPT_AFTER=$(mktemp)
|
IPT_AFTER=$(mktemp)
|
||||||
run_on $HOST1 "sudo iptables-save | grep -i weave | grep -v '\[.*:.*\]' > $IPT_BEFORE"
|
run_on $HOST1 "sudo iptables-save | grep -i weave | grep -v '\[.*:.*\]' > $IPT_BEFORE"
|
||||||
|
|
||||||
run_on $HOST1 sudo iptables -t filter -D FORWARD -o weave -j WEAVE-NPC
|
run_on $HOST1 "sudo iptables -t filter -D FORWARD -o weave -m comment --comment \"NOTE: this must go before '-j KUBE-FORWARD'\" -j WEAVE-NPC"
|
||||||
run_on $HOST1 sudo iptables -t nat -D POSTROUTING -j WEAVE
|
run_on $HOST1 sudo iptables -t nat -D POSTROUTING -j WEAVE
|
||||||
kill_weaver # should re-create the bridge and iptables friends
|
kill_weaver # should re-create the bridge and iptables friends
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user