Scenario: Multiple internal VMs behind one public IP
This scenario is for deploying multiple VMs. All instances are connected to an internal network and one public instance. The public instance is also connected to the public network with a public IPv4 address. It acts as a gateway or "jump server" to the internal instances.
Deploy the instances
In this scenario, the internal template is used. You need to have Show all selected in the group selection to see it.
Make sure you have uploaded your SSH public key as described in Getting started.
First install the public instance, using the public template as described in scenario One VM with a public IP. Then install the internal instances:
- Navigate to Instances ➡ VMs in the menu and click on the button to create the VM.
- Select the template Ubuntu 22.04 (ice-internal).
- Fill in a VM name to use as hostname.
- When creating several VMs, the wildcard
%idx
will be replaced with a number starting from 0. In the legacy Sunstone GUI, the wildcard is%i
instead. - The VM Name defaults to the template name followed by the ID if left empty.
- When creating several VMs, the wildcard
- Optionally, adjust the capacity in terms of Memory and Virtual CPU.
- Optionally, increase the Number of instances to as many as you want to deploy.
- Click Next and fill in a Password for console access.
- Click Next and configure any advanced options, adjusting storage, etc.
- Click Finish to deploy.
Access via SSH
The public instance can be accessed directly as described in the single instance scenario, see Access via SSH.
To access the internal instances the public instance can be used as a jump server for SSH using the -J command line argument:
SSH config
If you want to avoid typing the -J command line argument, you can update your client’s SSH configuration in ~/.ssh/config with the following:
Host [Internal instance name]
HostName [Internal instance IP]
ProxyJump root@[Public instance public IP]
Name root
For example, having an internal instance that we call internal1 with IP 172.22.0.123 and the public IP of the public instance is 194.28.122.111:
Then we can access the internal instance with ssh internal1
.