Traefik stalls while connecting to service

I run traefik 2.9 from a docker image via docker-compose.
To test it, I run traefik/whoami, registered it as

 - "traefik.http.routers.whoami.rule=Host(`whoami.docker`)"

The dashboard shows me that traefik detects the whoami service and other services I try to run.
When I try to connect via

curl -v -H Host:whoami.docker http:///localhost

it just stalls and generates a 504 Gateway timeout. When calling

curl -v -H Host:whoami.docker.wrong http:///localhost

I get a 404 as expected.

All other services stall the same way.

What can I do?

Ah, added

   network_mode: "host"

to docker-compose.yml and all is fine.