How to access docker service with docker private ip and port from different host in aws without port forwarding or using docker host ip

I have the following setup, where both host are in same VPC.


  • Aurora: Unknown schema in docker parameters
  • Docker Service won't start Windows Server 2016
  • SSH into staging machine from docker instance using Bitbucket Pipelines
  • Using docker-compose (formerly fig) to link a cron image
  • Docker not able to run Java app
  • How can I get an upstart script to properly manage running a docker image?
  •  public ip : 53.X.X.X 
     private ip : 172.X.X.X 
     docker ip : (bridge ip)


     public ip : 53.X.X.X 
     private ip : 172.X.X.X

    Now, when I launch container from host1, let’s say tomcat, how can I access this server with private and port from Host2?

    I wanted like this from host2 host1 nameserver in host2.

    Basically, I wanted this use case because I am using consul for service discovery, and in consul service are registered as But when I do nslookup tomcat.service.consul I am able to resolve the service ip and port. But when I do a telnet or curl for this ip”port it times out. Allowed all traffic and iptables rule between hosts.

    I am able to achive above usecase with port forwarding and accessing service using host ip.But i need the above approach from host2

    So any suggesation would be helpful

  • Bash script to setup Docker fails, but individual commands work
  • How come that `docker-compose up` throws an error where `docker run` works fluently
  • docker revert changes to container
  • Can't expose web server using docker on OSX
  • Host is not running on when I am trying to connect to a docker image
  • Docker “Jenkins” image can't access internet
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.