Docker Community Forums

Share and learn in the Docker community.

Docker networking V 1.9

(Kalyanasundaram) #1


I have installed the docker V 1.9.1 on my Centos-7 Operating system. and i have one container and so we are able to communicate in between host machine and container, but not between an another host machine and container.

All host machine are same subnet ( and docker subnet

Note: we are able to communicate from docker container to other network(private"another host machine" & public), but not from another host machine to docker container.

Could you please any one of you guide me?

(Brandon Mitchell) #2

This depends on your local routing and firewall policies on the host and other machines on the network (netstat -nr and iptables -vS). Typically, you would publish a port on the host with something like docker run -p 8080:80 nginx to publish port 8080 on the host and map that to port 80 on the container.

(Dvohra) #3

Set port forwarding to the other host.
For AWS an example:
ssh -i “pemfile.pem” -f -nNT -L host_IP:8081:

host_IP is the other host’s IP
8081 is the port on the other host is the container ip forwarded to is the Amazon EC2 DNS