Solve the Problem of Linux Virtual Machine surfing in Vbox

Source: Internet
Author: User


Currently, there are two main ways to solve the problem of VM surfing and Host communication in Virtual Box: 1. Using Bridge Connection 2. Using Host-Only and Nat (this problem is solved today) 1. for network adapter 1, select Host-Only and Host-Only from windows. (If not, choose "manage"> "global settings"> "add a Host-Only NIC to the network".) 2. Set the IP address of the Host-Only NIC in Windows: (set it as a gateway here) for example, 192.168.56.1, 255.255.255.0 (do not set other parameters) 3. in Linux/etc/sysconfig/network-scripts, set the NIC information (if you do not know the specific Nic please use ifconfig-a) ifcfg-eth0 www.2cto.com such as: 01 DEVICE = eth002NM_CONTROLLED = yes03ONBOOT = yes04HWADDR = 08: 00: 27: 1c: 15: 5605 TYPE = Ethernet06BOOTPROTO = none07IPADDR = 192.168.56.13708PREFIX = 2409 GATEWAY = 192.168.56.110DEFROUTE = Signature = yes123166init = no13NAME = "System eth0" 14 UUID = Signature = no and then: restart or service network restart. The host and virtual machine should be able to communicate normally at this time. Next, set NAT to access the Internet;
4. In the virtual machine settings, select a NIC and select NAT Internet access mode. 5. Set the corresponding Nic information like 3. Because the NAT mode is automatic, DHCP is used for the IP address here, for example, www.2cto.com 1 DEVICE = eth22NM_CONTROLLED = yes3ONBOOT = yes4HWADDR = 08: 00: 27: 8B: 95: AB5BOOTPROTO = dhcp 6, Reboot author fat bear

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.