dockerdocker-swarmmesh-networkdocker-ingress

Docker swarm ingress - unable to connect through two networks


I tried to run docker swarm over two different networks.

Both networks can see each other. There are no firewall rules between them to block any traffic. Specifically I tested 7946 TCP and UDP and 4789 UDP. I can confirm, that I can connect from the first network to the second network on both ports and both protocols. And also from the second network to the first network without any issue.

Docker swarm is up and running and used engine is 20.10.11 I can see that all nodes have status=Ready and availability=Active.

Ingress network is default:

enter image description here

and I can see all peers listed there as well.

But when I deploy any service to any node with port -p 20000:80, then I can see this node only from the network where it was deployed.

enter image description here

Any thoughts how to fix this?

Thanks


update 1:

Tried to run swarm with additional parameter docker swarm init --default-addr-pool 172.100.0.0/16. Result remains the same.


update 2: Based on the advice from @BMitch

I verified with sudo tcpdump -nn -s0 -v port 4789 or 7946, that port 7946 works (UDP and TCP). I also verified with the previous tcpdump command and nc -z -v -u 10.10.150.200 4789 (run from the first network), that port 4789 works as well.


Solution

  • In the end - problem was in the NAT. Our second network was behind NAT, which caused this issue. Once we removed NAT, everything worked.