Open ThomasZeman opened 6 years ago
From a review of the code I believe this will affect Docker versions going back at least to 17.06. :( Even when there was only one DOCKER-ISOLATION chain, it used the same style of policies when dealing with internal networks. The explicit "from bridge to bridge" seems reasonable at first blush.
This seems to affect another setup as well: Container A,B,C. A and B connected with internal network X (say 10.1.1.0/24), B and C connected with internal network Y (say 10.1.2.0/24).
A --- [ network X] --- B --- [ network Y ] --- C
It is not possible for B to route pakets from A to C because the host firewall will drop them as they originate from subnet 10.1.1.0 and not 10.1.2.0.
Description
The FORWARD rules created by a bridged "--internal" network do not allow broadcast pakets to travel from one container to another. It works with non --internal bridged networks. The difference is displayed below.
For a non-internal, working setup the FORWARD rules look like:
A container to container broadcast paket traverses the rules in the following way:
For an internal bridge the rules are set up as follows:
A container to container broadcast paket traverses the rules in the following way:
The matching rule dump looks like:
Steps to reproduce this issue
Set up two container, connected by an internal bridge, one with a process broadcasting pakets to 255.255.255.255, the other one receiving pakets. The receiver will not receive broadcast pakets.
Expected behavior
Broadcast pakets can traverse container boundaries.
Additional info
Prepending the rule:
results in:
which fixes the problem.
I am using the following docker versions: