Mutual access between virtualbox virtual machines and host machines in ubuntu

Source: Internet
Author: User


Last night I was playing with the virtualbox Virtual Machine under ubuntu. I installed several systems on the virtual machine. Because the system accesses the Internet in virtualbox by default. In this way, virtual machines can access the external network, but the external network cannot access the virtual machine, and even the host machine cannot access the virtual machine. In this way, I connect to the virtual machine using ssh as in windows. (In windows, I use a vmwarevm. NAT can directly achieve mutual access between the host and the virtual machine. This is also the difference between virtualbox and VMware .)
First, let's talk about my network environment and configuration: Network Environment: Campus Network. Each host must have a network id to be verified before accessing the Internet. (For our students who have a netid, the direct bridging method can be abandoned.) host environment: a laptop, ubuntu 10.04, virtualbox virtual machine, and ubuntu11.04 are installed on the virtual machine. Target: the host machine can communicate with the ubuntu of the virtual machine. Use secureCRT for connection verification.
In the default NAT mode of a virtual machine, it is not successful to connect to the Virtual Machine with secureCRT on the host machine, because in the NAT mode, the host machine cannot access the virtual machine. I have been using Baidu and Google for a while. I have said on the Internet that port ing is required, but it is useless. It seems that it is necessary to analyze the specific situation. This is when I want to give up. I was advised to enable a wireless connection on the host to connect the virtual machine. The virtual machine uses the bridging method. I tried to establish a wireless connection. Www.2cto.com

After creating the wireless network, set the connection mode of the Virtual Machine System to Bridge Adapter, and select the wireless network Adapter (eth1) as follows:

After the configuration is complete, start the virtual machine directly. In this case, the host machine can access the virtual machine. At the same time, Virtual Machine Access to the Internet is not affected. Note: You must create a new wireless connection and then select the bridging method of the wireless network card. Otherwise, the bridge function cannot be implemented. Prepared by AI_Net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.