Skip to content

Commit

Permalink
Merge pull request flannel-io#327 from eyakubovich/outer-masq
Browse files Browse the repository at this point in the history
Masquerade host to flannel traffic.
  • Loading branch information
eyakubovich committed Sep 28, 2015
2 parents 2090413 + 8d11ddc commit a5e1177
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion network/ipmasq.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ func setupIPMasq(ipn ip.IP4Net) error {
{"FLANNEL", "-d", ipn.String(), "-j", "ACCEPT"},
// NAT if it's not multicast traffic
{"FLANNEL", "!", "-d", "224.0.0.0/4", "-j", "MASQUERADE"},
// This rule will take everything coming from overlay and sent it to FLANNEL chain
// This rule will take everything coming from overlay and send it to FLANNEL chain
{"POSTROUTING", "-s", ipn.String(), "-j", "FLANNEL"},
// Masquerade anything headed towards flannel from the host
{"POSTROUTING", "!", "-s", ipn.String(), "-d", ipn.String(), "-j", "MASQUERADE"},
}

for _, rule := range rules {
Expand Down

0 comments on commit a5e1177

Please sign in to comment.