Connecting to a port on the host from inside the container

In your post you use telnet to connect to a loopback interface on the host and want to connect to a port on another IP address from a container. That would never work if the service on the host listens only on localhost, not even without Docker. It is just that the IP address you use for connecting from a container is a Docker network gateway. You need the process on the host listen on the gateway IP as well, or you can implement something similar to Docker Desktop’s host.docker.internal

Nowhere in @deanayalon’s post was mentioned that you used that :slight_smile: But it is true, that with Docker Desktop that would be the solution so the requests from the containers would be forwarded to the loopback IP on the host. Without that, you have to implement it for youself as I described in the linked post. Or depending on from where you need to access the service on the host, you can just reconfigure it to listen on the docker network gateway.