VirtualBox configuration supports both Internet and local access

As we all know that Oracle VM VirtualBox is a free and open source virtual machine, novices often encounter a very tangled problem:

The installed system not only needs to be connected to the Internet, but also needs to be able to communicate with the local host.

 

Problem description :

Can access the Internet, but the local host cannot access the virtual machine;

 

Solution 1 :

If you don’t care about security issues, you can directly set the virtual machine's network card to "bridged network card", so that it is in the same network segment as the local host, which is equivalent to the host under the same route, only the host host What it can do, it can do it, including other computers on the same LAN can also access the virtual machine (unless there are restrictions on the router);

 

Solution 2 :

If you need to ensure security issues, you can set up two network cards (after all, it is virtual, and one more network card is also very convenient);

(1) Set up a Host-Only network card, which can only be accessed by the host of the local host (but cannot go online);

Guess you like

Origin blog.csdn.net/juesystem/article/details/112979815