Skip to content

Can't connect from inside container back into an exposed port with the host public ip [0.10.0] #5111

@garo

Description

@garo

My host machine has a public ip A. I then launch an container with -p 6000:6000 and create a process which starts to listen this port 6000. The process then tries to connect into itself via the host public ip A. It seems that this no longer works with 0.10.0, but has worked before, at least with 0.9.0 and 0.9.1.

This feature is required by at least mongodb so that the running instance can identify itself from a list of hosts by connecting back to itself. This helps fixing NAT related issues.

How to reproduce:

  1. docker run --rm -i -t -p 27018:27018 ubuntu /bin/bash
  2. inside this container: Launch "nc -l 27018" in background or use screen or tmux to display two processes next to each other in parallel.
  3. inside this container: telnet 27018

This should connect the telnet to the netcat and let you type characters across the network. With docker 0.10.0 this does not work, but it works at least with docker 0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions