• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. User Guide
  4. FAQs
  5. Virtualization
  6. How Do I Access VMs on a BMS with KVM Deployed from the Internet?

How Do I Access VMs on a BMS with KVM Deployed from the Internet?

Solution

You can install the port mapping software rinetd on a Linux BMS so that you can access VMs deployed on the BMS from the Internet. Take CentOS 7 as an example. Perform the following steps:

  1. Download the rinetd installation package from the following path and upload it to the BMS:

    http://www.boutell.com/rinetd/http/rinetd.tar.gz

  2. Run the following commands to install rinetd:

    tar zxvf rinetd.tar.gz

    mkdir -p /usr/man/man8

    cd rinetd/

    make

    make install

  3. Run the following command to add the port mapping rule to the configuration file:

    vi /etc/rinetd.conf

    The following is an example: Local IP address Local port VM internal IP address VM port

    0.0.0.0 22222 192.168.124.81 22

  4. Run the following command to start the rinetd process:

    /usr/sbin/rinetd

  5. Run the following command to connect to port 22222 corresponding to the BMS using SSH to access the VMs from the Internet:

    ssh BMS EIP:22222