Curl from container A to B blocked

Hi @b0r1sp, can you share your docker-compose.yml please, without more context I cannot help, only guess on the wild...

FYI, the error of the curl in 1)a. is related to the transport level: your container is not able to establish a connexion to the IP 139.xxx.171.xx... on the port 80. My guess is that you are using Docker inside a virtual machine (Docker4Mac, docker-machine, Docker4Windows), etc., and that VM is not able to route network packets to this IP (or is not allowed by your host FW). Can you detail more your config here?

Also, assuming that Traefik is running in a container and its port 80 is published on all interfaces visible to the Docker Engine (e.g. docker run -p 80:80 ... or

ports:
  - "80:80"

in docker compose), then you might want to try the following curl command:

curl -v -H "Host: a.example.com" http://172.17.0.1:80

where 172.17.0.1 is the IP of the interface docker0 that might change on your configuration. You can retrieve this IP with this command: docker run --rm -ti alpine ip route | grep default.