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:
- Download the rinetd installation package from the following path and upload it to the BMS:
- Run the following commands to install rinetd:
tar zxvf rinetd.tar.gz
mkdir -p /usr/man/man8
cd rinetd/
make
make install
- 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
- Run the following command to start the rinetd process:
/usr/sbin/rinetd
- 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

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.