Unable to access docker swarm services if external client IP is same as ingress network broadcast address
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
When trying to access resources hosted on a docker swarm ingress network (i.e. 10.0.0.0/24), if the client has the IP same as broadcast of the ingress network (i.e. 10.0.0.255), it is unable to access anything hosted on the docker swarm
Steps to reproduce the issue:
- ingress network with IP address which is a subset of LAN network.
- have non-swarm client with IP address same as broadcast address of ingress network
- setup service with externally accessable ports
Describe the results you received:
Unable to access any services hostsed on docker swarm network.
Describe the results you expected:
Able to access resources hosted on docker swarm
Additional information you deem important (e.g. issue happens only occasionally):
Wireshark packet capture shows the TCP connections are not even being responded to by any swarm node.
Output of docker network inspect ingress
[
{
"Name": "ingress",
"Id": "kpu8i0gi6t71fsquozbrek7lq",
"Created": "2021-05-02T00:44:06.787200553Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.0.0.0/24",
"Gateway": "10.0.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": true,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"6c85dcd4040115e4085d69239473d5ab17c1746296e9d03ba65611acba05ada7": {
"Name": "mediawiki_mediawiki.2.plg9hn0aqdhrljkgehf8q2f5y",
"EndpointID": "ed3a92f72ebb19b6fbf3df77497dbb988dfbab30d80305554625be70f69e1e0f",
"MacAddress": "02:42:0a:00:00:17",
"IPv4Address": "10.0.0.23/24",
"IPv6Address": ""
},
"f0a9a2c1e70208fe38d476e8fc5d085d0374bab2ffabf339bb36bf81504a07dd": {
"Name": "influxdb.1.xn5rumyj6x1l1adtrsuy3uqer",
"EndpointID": "cebe56f570eaa28cc5f065e817e6dfb366d2c0786b051ccdeea098ad210c68c5",
"MacAddress": "02:42:0a:00:00:13",
"IPv4Address": "10.0.0.19/24",
"IPv6Address": ""
},
"ingress-sbox": {
"Name": "ingress-endpoint",
"EndpointID": "4dedf17b1e6e8a8645b94198f4af591f92f7619254c8c6702f846ddb736a1fd8",
"MacAddress": "02:42:0a:00:00:06",
"IPv4Address": "10.0.0.6/24",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "4096"
},
"Labels": {},
"Peers": [
{
"Name": "62558c6704ca",
"IP": "10.0.2.225"
},
{
"Name": "e0506a02bffc",
"IP": "10.10.4.3"
},
{
"Name": "ecfec4ec64f9",
"IP": "10.10.4.4"
},
{
"Name": "9a23351be38d",
"IP": "10.10.2.0"
},
{
"Name": "209b8d567679",
"IP": "10.12.1.2"
}
]
}
]
Output of docker version:
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:46:45 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:44:56 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc.)
scan: Docker Scan (Docker Inc., v0.7.0)
Server:
Containers: 11
Running: 11
Paused: 0
Stopped: 0
Images: 27
Server Version: 20.10.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: 3kjw190p7axvmi0rz5lyh4rhr
Is Manager: true
ClusterID: r9apuestoan9wk5mayhuc4u3p
Managers: 5
Nodes: 5
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 10.12.1.2
Manager Addresses:
10.0.2.225:2377
10.10.2.0:2377
10.10.4.3:2377
10.10.4.4:2377
10.12.1.2:2377
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.19.0-16-amd64
Operating System: Debian GNU/Linux 10 (buster)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 9.759GiB
Name: docker125
ID: X2QP:EQSN:FGIV:RD4Y:YP3Z:LLES:H7LR:KL3K:S6MM:VCNE:7XKK:4P45
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: adamus1red
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.):
Swarm is a mix of physical and virtual nodes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported reproduction: create a Swarm ingress network such as 10.0.0.0/24, use an external client at its broadcast address, and publish a service port. Inspect the ingress network with docker network inspect ingress and compare packet behavior with a Wireshark capture. Done means the external client can access published Swarm services from that address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100