Swarm containers can ping but not TCP out, hosts can

I noticed it because some redis databases I’ve deployed couldn’t talk to each other.

I’ve got three nodes with a redis container on each, each host can telnet to the private IP address of each other host on the redis port and connect.

I’ve tried with the service connected to the host network and an overlay network and whatever the default is (ingress?)

The containers can’t telnet to the same IPs of the hosts on the same port. Similarly, they can ping google.com but can’t telnet to port 443 on google.com.

IPV4 forwarding is enabled. DNS seems to work.

I’ve tried and hit this on Amazon’s Linux and Centos 7. Docker version 19.03.1, build 74b1e89. Any ideas?

Solved.

It’s an issue with the alpine linux telnet client. Other tools for testing open ports work fine.