You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspect iptables-save, docker does not install rules to prevent icc
Describe the results you received:
Docker installs the following additional iptables rules when I enter the command above (diff):
+-A DOCKER-ISOLATION ! -s 192.168.10.0/24 -o br-9d9f7fff544d -j DROP
+-A DOCKER-ISOLATION ! -d 192.168.10.0/24 -i br-9d9f7fff544d -j DROP
This only makes the network internal. Docker installs the very same rules if I leave out the --opt="com.docker.network.bridge.enable_icc=False" option (or use lower-case false).
Describe the results you expected:
If I just run docker network create -d bridge --subnet=192.168.10.0/24 --opt="com.docker.network.bridge.enable_icc=False" mynetint without --internal, docker adds the following iptables rules (diff):
-A FORWARD -j DOCKER-ISOLATION
+-A FORWARD -o br-2f4e24d5565f -j DOCKER
+-A FORWARD -o br-2f4e24d5565f -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A FORWARD -i br-2f4e24d5565f ! -o br-2f4e24d5565f -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
+-A FORWARD -i br-2f4e24d5565f -o br-2f4e24d5565f -j DROP
+-A DOCKER-ISOLATION -i docker0 -o br-2f4e24d5565f -j DROP
+-A DOCKER-ISOLATION -i br-2f4e24d5565f -o docker0 -j DROP
-A DOCKER-ISOLATION -j RETURN
In particular, note the rule -A FORWARD -i br-2f4e24d5565f -o br-2f4e24d5565f -j DROP which drops icc. This rule is missing if I add the --internal command when I create the network.
My expectation: I get a network which is both internal and icc is prevented. This may be important for security.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 22:01:48 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 22:01:48 2016
OS/Arch: linux/amd64
@thaJeztah The fix is not a breaking change. We did not included in the 1.12.x cherry-pick because the issue existed in 1.11.x, not a breakage introduced in 1.12.x. We did not think of it as a security issue though.
@mavenugo Based on @diekmann 's view of this as a security issue, I think we should consider back porting the fix to 1.12.x branch. It is also a simple one. WDYT ?
Description
I create a network which should be internal and inter-container communication (icc) should also be prohibited. However, icc is allowed.
Steps to reproduce the issue:
docker network create -d bridge --subnet=192.168.10.0/24 --opt="com.docker.network.bridge.enable_icc=False" --internal mynetint
Describe the results you received:
Docker installs the following additional iptables rules when I enter the command above (diff):
This only makes the network internal. Docker installs the very same rules if I leave out the
--opt="com.docker.network.bridge.enable_icc=False"
option (or use lower-casefalse
).Describe the results you expected:
If I just run
docker network create -d bridge --subnet=192.168.10.0/24 --opt="com.docker.network.bridge.enable_icc=False" mynetint
without--internal
, docker adds the following iptables rules (diff):In particular, note the rule
-A FORWARD -i br-2f4e24d5565f -o br-2f4e24d5565f -j DROP
which drops icc. This rule is missing if I add the--internal
command when I create the network.My expectation: I get a network which is both internal and icc is prevented. This may be important for security.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Environment: Testing docker in lubuntu16.04 virtual machine on VirtualBox.
The text was updated successfully, but these errors were encountered: