If you are setting up a Swarm and Overlay network on Centos 7, you will need to open the following ports to allow for inter-container communication across Docker hosts:
- For the host with KV Store (e.g. Consul) – 8500/tcp (for KV communication)
- If using Consul, – 8600/tcp (for DNS resolution)
- For host(s) with Swarm Manager: 4000/tcp (only if Swarm Manager is to be remotely accessed)
- All hosts – 2375/tcp (Swarm Manager/Agent), 4789/udp (for VXLAN), 7946/tcp, and 7946/udp
Of course, this list is non-exhaustive – if you are running a private registry, 3rd party Docker engine plugin(s), and other supporting containers/services, their ports need to be added too.