Reputation: 1148
I have Ubuntu server & my laptop (another network). In my router settings I set port forwarding from my static external ip --> internal ubuntu server ip.
So, to connect to my server I just use ssh user@external_ip -p 21115
where 21115 binded in router settings.
Now I run docker daemon at my server via dockerd -H 0.0.0.0:2375
What should I do to connect from my laptop to docker daemon?
Upvotes: 2
Views: 409
Reputation: 382
Do the same thing as for server, but redirect different port on your router for this second connection.
for example:
"your external IP" and "dst port:2375" --> "your internal IP" and "dst port:2375".
I don't know what are possibilities of yours router, but to keep it safe you should add whitelist to allow this rules for trust IP only
Upvotes: 2