Outbound telnet connection from Docker container refused but works fine on host

saada

I'm facing a network issue on a node hosted via Tutum to AWS.

I sshed into the node and ran

telnet localhost 3000

and it works great. When I docker exec -it <containerid> bash into one of my containers and run the same command above and I get this error:

telnet: Unable to connect to remote host: Connection refused

Can anyone shed some light as to why outbound connections from container to host is not permitted?

Auzias

What network stack are your containers using? localhost mean local. On your host it is the host-local-interface, your containers it is their own host-local-interface. So unless you run your containers with --net=host it is a regular behavior since there is no service running on containers-localhost-ip:3000 but only on host-localhost-ip:3000 which are different.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Connection refused with telnet, curl works

From Dev

Connection refused on docker container

From Dev

Telnet [Unable to connect to remote host: Connection refused]

From Dev

Connection Refused connecting from docker to Elasticsearch docker container

From Dev

Connection refused on nginx docker container

From Dev

Docker mongo image 'Connection refused' from other container

From Dev

docker nginx container not receiving request from outside, connection refused

From Dev

Nginx in Docker container gets `connection reset` error, but works fine without a container

From Dev

Nginx in Docker container gets `connection reset` error, but works fine without a container

From Dev

SSH and Telnet Connection refused

From Dev

SSH and Telnet Connection refused

From Dev

Android Socket fails to create, Telnet connection works fine

From Dev

Why does telnet localhost 25 works and telnet mailvm2 25 get Connection refused?

From Dev

Telnet connection to Debian machine refused

From Dev

Getting "connection refused" when trying to access etcd from within a Docker container

From Dev

Docker container Network connection between different host

From Dev

Connecting from a docker container to the host?

From Dev

Restarting host from docker container

From Dev

Docker container inaccessible from host

From Dev

Host monitoring from a docker container

From Dev

Docker container inaccessible from host

From Dev

Connecting from a docker container to the host?

From Dev

Spring boot inside docker container throws java.net.ConnectException: Connection refused (Connection refused)

From Dev

Connection refused when try to connect http server in docker daemon container

From Dev

Connection refused : Nginx HTTPS reverse proxy in docker container

From Dev

Virtualbox, ssh from Ubuntu host to Ubuntu guest: connection refused

From Dev

Docker: Copying files from Docker container to host

From Dev

telnet - "Connection closed by foreign host"

From Dev

Connection refused only locally. Access from outside works

Related Related

  1. 1

    Connection refused with telnet, curl works

  2. 2

    Connection refused on docker container

  3. 3

    Telnet [Unable to connect to remote host: Connection refused]

  4. 4

    Connection Refused connecting from docker to Elasticsearch docker container

  5. 5

    Connection refused on nginx docker container

  6. 6

    Docker mongo image 'Connection refused' from other container

  7. 7

    docker nginx container not receiving request from outside, connection refused

  8. 8

    Nginx in Docker container gets `connection reset` error, but works fine without a container

  9. 9

    Nginx in Docker container gets `connection reset` error, but works fine without a container

  10. 10

    SSH and Telnet Connection refused

  11. 11

    SSH and Telnet Connection refused

  12. 12

    Android Socket fails to create, Telnet connection works fine

  13. 13

    Why does telnet localhost 25 works and telnet mailvm2 25 get Connection refused?

  14. 14

    Telnet connection to Debian machine refused

  15. 15

    Getting "connection refused" when trying to access etcd from within a Docker container

  16. 16

    Docker container Network connection between different host

  17. 17

    Connecting from a docker container to the host?

  18. 18

    Restarting host from docker container

  19. 19

    Docker container inaccessible from host

  20. 20

    Host monitoring from a docker container

  21. 21

    Docker container inaccessible from host

  22. 22

    Connecting from a docker container to the host?

  23. 23

    Spring boot inside docker container throws java.net.ConnectException: Connection refused (Connection refused)

  24. 24

    Connection refused when try to connect http server in docker daemon container

  25. 25

    Connection refused : Nginx HTTPS reverse proxy in docker container

  26. 26

    Virtualbox, ssh from Ubuntu host to Ubuntu guest: connection refused

  27. 27

    Docker: Copying files from Docker container to host

  28. 28

    telnet - "Connection closed by foreign host"

  29. 29

    Connection refused only locally. Access from outside works

HotTag

Archive