Access virtual machines of other users in the LAN

This article uses the example of accessing the database in the virtual machine of other users in the local area network to illustrate:

Such as local ip: 192.168.0.135 user A

Machine ip to be accessed: 192.168.0.89 User B

The port forwarded by user A's machine is 45211

ps: It can be forwarded through the port of the virtual machine itself. For example, I am using a vmware virtual machine.



 

 

 

 

You can also forward the 45211 (can be arbitrarily specified as long as the port does not conflict) port through some other port forwarding software (such as the TCPPortForwarding gadget).

IP: 192.168.135.136 in user A's virtual machine, database instance name: orcl

        The network adaptation mode of the virtual machine is nat.

User B accesses user A: Access user Aip: forwarded port +/database instance name in the virtual machine (192.168.0.135:45211/orcl).



 

 The local simulation test environment is:

In this machine, centos (nat mode) in the local virtual machine, and xp in the local virtual machine (the bridge mode and the local machine are equivalent to the local area network), you can access the oracle database in centos by configuring xp.

Note: Turn off the firewall of this machine.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326269903&siteId=291194637