Skip to content

Port Mappings

Mike Savochkin edited this page Mar 4, 2020 · 3 revisions

In a case, when p2p environment was recreated manually, port mappings for SSH will no longer work. In this case port mapping should be recreated manually as well, using map command.

First, you need to understand what IPs and ports are present in your environment. (TBD)

Let's say you have an environment with 3 containers:

  • 172.16.232.1
  • 172.16.232.3
  • 172.16.232.12

On host machine you should execute the following commands:

  • subutai map add -p tcp -i 172.16.232.1:22 -e 10001
  • subutai map add -p tcp -i 172.16.232.3:22 -e 10003
  • subutai map add -p tcp -i 172.16.232.12:22 -e 10012

Hint: To calculate correct port number you must take last octet of container's IP and add it to 10000: 10000+12 = 10012