-
Notifications
You must be signed in to change notification settings - Fork 670
weave expose
breaks subnet isolation
#620
Comments
Turns out it's also the case when |
When I replicate this, each container has a default route via 172.17.42.1, the docker0 bridge. Therefore, the outgoing packet has the address of eth0 as its source address, in my case 172.17.0.69. So the reply is to that address, and goes eth0->docker0->eth0. I also see packets from and to 10.2.1.101, which I am still investigating. |
If I understand correctly, the intent of |
Hmm. Do you think that is a reasonable semantics for |
No, I don't think it's obvious. I arrived at this conclusion after a long time trying to think up a rule to prevent the routing you were seeing while still allowing what If you don't want a container to be able to route via the host's network, then you can start it with |
Hmm. So what do you suggest? Just document the current behaviour? |
The weave script could add a rule to drop everything coming from the Docker bridge to the Weave bridge:
I have tried this, and it stops the behaviour complained about here, while still passing everything in smoke test 130. This may be closer to what people would expect - if you want a container to be able to access the weave network, do |
That does look sensible. |
Drop traffic from docker0 bridge to weave bridge Fixes #620.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
- Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.
This happens even without the masquerading rules added by
weave expose
, i.e. simply giving the bridge an IP is enough.Based on the interface packet stats, the request goes out through the default route via the eth0 interface to the docker bridge, the kernel routes it to the weave bridge, since the destination IP is in the subnet of the bridge's IP, and the bridge routes it to the destination container's ethwe.
The reply apparently travels the reverse route, i.e. out of the ethwe interface, over the weave bridge, docker bridge and into the eth0 of the other container. I cannot work out why that happens - the reply destination ought to be in the wrong subnet to go through ethwe.
The text was updated successfully, but these errors were encountered: