Remote Instance
This guide will explain adding and configuring a virtual machine type VPC to be able to access the Internet network and virtual machines can be accessed using the terminal on a computer.
Create VPC Expert
The first step to run telnet on your virtual machine is to create a VPC with the Expert type. For further guidance on creating an Expert type VPC, see sub-chapter 22.1 Create NAT Gateway. After successfully creating a VPC, you can see that the type in the VPC list is Expert and in the Available IP column it uses IP Network 100.10.10.0/24.
Delete NAT Gateway
Create Instance
After you have created a VPC with the Expert type, the next step is to create a virtual machine in the Instance menu to be able to access the router on the NAT Gateway. Create a virtual machine, and in the VPC Network column select the Expert type VPC that was previously created and continue by filling in all the available columns and click the Create Instance button for the Instance creation process in the Cloudeka portal service.
VM Instance
The virtual machine has been successfully created and is available on the Instances page.
List of Instances
Press the See All IP Address button to find out the Internal IP address used by the Instance, namely 100.10.10.92.
List Instance - IP Internal
Floating IP Configuration
After successfully creating a virtual machine on the Instance page, the next step is to configure Floating IP and NAT on the NAT Gateway. To go to the NAT Gateway page, select the Network menu, then select the NAT Gateway label and press the Configuration button.
Floating IP Configuration
The NAT Gateway Configuration page appears, select the Floating IP label and press the Create Floating IP button.
Floating IP Configuration
Select the VPC that will be assigned an IP address and press the Create button to continue the floating IP creation process.
Floating IP Configuration
A Floating IP notification has been successfully created. It can be seen on the Floating IP label with the status Created and getting a Public IP address 103.191.14.45.
Floating IP Configuration
Virtual Machine Access Internet
After adding a floating IP to the VPC, so that the virtual machine can access the internet network, you must add a SNAT configuration to the VPC. On the Network page, select the NAT Gateway label and press the Configuration button.
Virtual Machine Access Internet
On the NAT label on the NAT Gateway page press the Create NAT button to display the Create NAT window.
Virtual Machine Access Internet
In the Type column, select SNAT because the virtual machine will access the external network. In the Destination Address column, select the floating IP address that was previously created. In the Translation Address column, select the virtual machine that will use the SNAT configuration. The Description section is optional for you to explain the configuration. is being created, and press the Create button to continue the process of creating a SNAT configuration on the VPC.
Virtual Machine Access Internet
Wait until the SNAT configuration process is complete.
Virtual Machine Access Internet
To test whether the virtual machine has successfully accessed the internet network by accessing the virtual machine console where the SNAT configuration is applied. On the Instance page and press the More button then select Access Console on the virtual machine where the SNAT configuration is applied.
Virtual Machine Access Internet
The virtual machine console window appears, enter the username and password to be able to enter the virtual machine.
Virtual Machine Access Internet
After successfully entering the main page of the virtual machine, to test that the virtual machine has successfully accessed the internet, we will test the connection to the IP address used by Google as a commonly used search engine on the Internet. Enter ping 8.8.8.8 into the virtual machine terminal.
Virtual Machine Access Internet
The virtual machine has successfully accessed the internet network, which can be seen from the results of the connection test carried out to the IP address used by Google.
Virtual Machine Access Internet
To ensure that the network route used by the virtual machine to successfully access Google’s IP address is in accordance with the SNAT configuration, type in the terminal traceroute 8.8.8.8
Virtual Machine Access Internet
The results of searching the route to Google’s IP address obtained twelve hop lines with the maximum hops used being 30 and a packet size of 60 bytes. The second line shows the data packet that was taken first to the port"pool-100-10-10-73.prvdri.fios.verizon.net" with IP address 100.10.10.73 with a travel time of 4,099 ms. The third line shows that the data packet was taken to 103.191.14.1, namely the Gateway IP address used by the Floating IP in the VPC, up to line eight, namely the network used by Lintasarta (idola.net.id) and continued up to the twelfth line used by Google.
Virtual Machine Access Internet
Remote Virtual Machine Using Computer Terminal
To be able to control the server remotely using the terminal on the computer you are using, the next step is to add the DNAT configuration first. On the Network page, select the NAT Gateway label and press the Configuration button.
Remote Virtual Machine Using Computer Terminal
On the NAT label on the NAT Gateway page press the Create NAT button to display the Create NAT window.
Remote Virtual Machine Using Computer Terminal
In the Type column, select DNAT because VPC will provide external network access to access virtual machines on the Cloudeka portal service. For the Protocol column, select TCP and enter Translation Port TCP, namely 22 and Destination Port is the port that will be used to alias the port that Translation Port uses. In the Destination Address column, select the floating IP address that was previously created, in the Translation Address column, select the virtual machine that will use the DNAT configuration, in the Description section, it is optional for you to explain the configuration that is being created, and press the Create button to continue the process of creating the DNAT configuration. on the VPC.
Remote Virtual Machine Using Computer Terminal
Wait until the DNAT configuration process is complete.
Remote Virtual Machine Using Computer Terminal
The next step is to add incoming rule configuration to the Security menu. On the Security menu page, press the Create Security button.
Remote Virtual Machine Using Computer Terminal
Fill in the Name, Description columns, and in the Inbound Rule section press the New Rule button.
Remote Virtual Machine Using Computer Terminal
For the first inbound rule type, select Custom TCP Rule. The Port Range column for min/max corresponds to the port configured in the Destination Address during DNAT configuration.
Remote Virtual Machine Using Computer Terminal
Make sure to deploy on a virtual machine that has VPC configured and press the Create Security Firewall button to continue the process.
Remote Virtual Machine Using Computer Terminal
Wait until the Security Group configuration process is complete.
Remote Virtual Machine Using Computer Terminal
Open the terminal on your computer. In this guide, use the terminal for the Windows operating system. If you are using a Mac operating system you can just type telnet [Destination IP] [Port]. To check whether the port that has been configured in the DNAT configuration can be used by typingTelnet on the terminal.
Computer Terminal
Type Open and enter the Flaoting IP address of the VPC you are using and press the Enter key.
Telnet Test
The message “Press any key to continue” appears, which means the IP address 103.191.14.45 can be used.
Result Test Telnet
This is the final step to be able to access the virtual machine using a computer terminal by opening a new computer terminal then typingssh -p[Port] [IP Address] then press Enter.
SSH Instance
Enter the password that your virtual machine uses in the Instance and the virtual machine’s main page appears.
SSH Instance Login
Success SSH Instance